File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -220,6 +220,11 @@ PHP NEWS
220220 . Fixed bug #49874 (ftell() and fseek() inconsistency when using stream
221221 filters). (Jakub Zelenka)
222222
223+ - XML:
224+ . xml_parser_set_option() now reports invalid XML_OPTION_SKIP_TAGSTART
225+ values more consistently and avoids an extra object-to-int conversion
226+ warning for unsupported values. (Weilin Du)
227+
223228- Zip:
224229 . Fixed ZipArchive callback being called after executor has shut down.
225230 (ilutov)
Original file line number Diff line number Diff line change @@ -118,6 +118,11 @@ PHP 8.6 UPGRADE NOTES
118118 . proc_open() now raises a ValueError when the $cwd argument contains
119119 null bytes.
120120
121+ - XML:
122+ . xml_parser_set_option() now reports invalid XML_OPTION_SKIP_TAGSTART
123+ values more consistently and no longer emits an extra object-to-int
124+ conversion warning for unsupported values.
125+
121126- Zip:
122127 . ZipArchive::extractTo now raises a TypeError for the
123128 files argument if one or more of the entries is not
Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ Warning: xml_parser_set_option(): Argument #3 ($value) must be of type string|in
7575
7676Warning: xml_parser_set_option(): Argument #3 ($value) must be of type string|int|bool, stdClass given in %s on line %d
7777
78- Warning: Object of class stdClass could not be converted to int in %s on line %d
7978Encodings
8079xml_parser_set_option(): Argument #3 ($value) is not a supported target encoding
8180
Original file line number Diff line number Diff line change @@ -1588,7 +1588,11 @@ PHP_FUNCTION(xml_parser_set_option)
15881588 /* Integer option */
15891589 case PHP_XML_OPTION_SKIP_TAGSTART : {
15901590 /* The tag start offset is stored in an int */
1591- /* TODO Improve handling of values? */
1591+ if (Z_TYPE_P (value ) != IS_FALSE && Z_TYPE_P (value ) != IS_TRUE &&
1592+ Z_TYPE_P (value ) != IS_LONG && Z_TYPE_P (value ) != IS_STRING ) {
1593+ RETURN_FALSE ;
1594+ }
1595+
15921596 zend_long value_long = zval_get_long (value );
15931597 if (value_long < 0 || value_long > INT_MAX ) {
15941598 /* TODO Promote to ValueError in PHP 9.0 */
You can’t perform that action at this time.
0 commit comments