From: Ilia Alshanetsky Date: Tue, 17 Jan 2006 19:56:25 +0000 (+0000) Subject: Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line values). X-Git-Tag: php-5.1.3RC1~241 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6cb9d3ce5eeac125ea0701b7113352528c71bdf;p=php Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line values). --- diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index dd9e621b30..2495c60360 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -139,8 +139,18 @@ NEWLINE ("\r"|"\n"|"\r\n") ["][^"]*["] { + char *p = yytext; + /* ENCAPSULATED TC_STRING */ + while ((p = strpbrk(p, "\r\n"))) { + if (*p == '\r' && *(p + 1) == '\n') { + p++; + } + SCNG(lineno)++; + p++; + } + /* eat trailing " */ yytext[yyleng-1]=0;