]> granicus.if.org Git - php/commitdiff
Improvements to fix #72714, suggested by nikic
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 20 Aug 2016 10:42:03 +0000 (12:42 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 20 Aug 2016 10:44:20 +0000 (12:44 +0200)
ext/xml/tests/bug72714.phpt
ext/xml/xml.c

index 192c8f69495632698644cca7eee68c8deb99f2c7..7b44e1fd117e65bcd456f3525ae9ff245de4c624 100644 (file)
@@ -29,7 +29,7 @@ parse(20);
 ?>
 ===DONE===
 --EXPECTF--
-Notice: xml_parser_set_option(): tagstart ignored in %s%ebug72714.php on line %d
+Notice: xml_parser_set_option(): tagstart ignored, because it is out of range in %s%ebug72714.php on line %d
 string(9) "NS1:TOTAL"
 string(0) ""
 ===DONE===
index 5d5c2e4c1950124a9e2aa9b2d09d10aa89afae06..5912f9143ddda69271ecbfb0e64b506e783c28bf 100644 (file)
@@ -67,7 +67,7 @@ ZEND_GET_MODULE(xml)
 /* }}} */
 
 
-#define SKIP_TAGSTART(str) ((str) + (parser->toffset > strlen(str) ? strlen(str) : parser->toffset))
+#define SKIP_TAGSTART(str) ((str) + (parser->toffset > strlen(str) ? strlen(str) : parser->toffset))
 
 
 /* {{{ function prototypes */
@@ -1638,7 +1638,7 @@ PHP_FUNCTION(xml_parser_set_option)
                        convert_to_long_ex(val);
                        parser->toffset = Z_LVAL_PP(val);
                        if (parser->toffset < 0) {
-                               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "tagstart ignored");
+                               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "tagstart ignored, because it is out of range");
                                parser->toffset = 0;
                        }
                        break;