Skip to content

Commit 52793c1

Browse files
committed
Improvements to fix #72714, suggested by nikic
1 parent e4a006c commit 52793c1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/xml/tests/bug72714.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ parse(20);
2929
?>
3030
===DONE===
3131
--EXPECTF--
32-
Notice: xml_parser_set_option(): tagstart ignored in %s%ebug72714.php on line %d
32+
Notice: xml_parser_set_option(): tagstart ignored, because it is out of range in %s%ebug72714.php on line %d
3333
string(9) "NS1:TOTAL"
3434
string(0) ""
3535
===DONE===

ext/xml/xml.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ ZEND_GET_MODULE(xml)
6767
/* }}} */
6868

6969

70-
#define SKIP_TAGSTART(str) ((str) + (parser->toffset > strlen(str) ? strlen(str) : + parser->toffset))
70+
#define SKIP_TAGSTART(str) ((str) + (parser->toffset > strlen(str) ? strlen(str) : parser->toffset))
7171

7272

7373
/* {{{ function prototypes */
@@ -1638,7 +1638,7 @@ PHP_FUNCTION(xml_parser_set_option)
16381638
convert_to_long_ex(val);
16391639
parser->toffset = Z_LVAL_PP(val);
16401640
if (parser->toffset < 0) {
1641-
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "tagstart ignored");
1641+
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "tagstart ignored, because it is out of range");
16421642
parser->toffset = 0;
16431643
}
16441644
break;

0 commit comments

Comments
 (0)