From: Ilia Alshanetsky Date: Thu, 1 Jan 2009 20:16:24 +0000 (+0000) Subject: Fixed bug #46844 (php scripts or included files with first line starting X-Git-Tag: php-5.3.0beta1~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fec58a89eef7ccf431ff8cb534cb109c787e8851;p=php Fixed bug #46844 (php scripts or included files with first line starting with # have the 1st line missed from the output). --- diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index 05a698a321..7034e88736 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.6.dev on Tue Nov 4 01:40:34 2008 */ +/* Generated by re2c 0.13.5 on Thu Jan 1 15:13:42 2009 */ #line 1 "Zend/zend_language_scanner.l" /* +----------------------------------------------------------------------+ @@ -845,8 +845,8 @@ yymore_restart: return 0; } - /* ignore first line when it's started with a # */ - if (YYCURSOR == SCNG(yy_start) && *YYCURSOR == '#') { + /* ignore first line when it's started with a #! */ + if (YYCURSOR == SCNG(yy_start) && *YYCURSOR == '#' && *(YYCURSOR + 1) == '!') { while (++YYCURSOR < YYLIMIT) { if (*YYCURSOR == '\n') { ++YYCURSOR; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index cd7d2ba530..ba52cecec7 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -843,8 +843,8 @@ yymore_restart: return 0; } - /* ignore first line when it's started with a # */ - if (YYCURSOR == SCNG(yy_start) && *YYCURSOR == '#') { + /* ignore first line when it's started with a #! */ + if (YYCURSOR == SCNG(yy_start) && *YYCURSOR == '#' && *(YYCURSOR + 1) == '!') { while (++YYCURSOR < YYLIMIT) { if (*YYCURSOR == '\n') { ++YYCURSOR;