]> granicus.if.org Git - php/commitdiff
Fixed bug #46844 (php scripts or included files with first line starting
authorIlia Alshanetsky <iliaa@php.net>
Thu, 1 Jan 2009 20:16:24 +0000 (20:16 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 1 Jan 2009 20:16:24 +0000 (20:16 +0000)
  with # have the 1st line missed from the output).

Zend/zend_language_scanner.c
Zend/zend_language_scanner.l

index 05a698a321f5de26a302213d0eeb854cd0385c3b..7034e8873627a01737946f29394deb79bc0a5b25 100644 (file)
@@ -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;
index cd7d2ba5308a693bc5b50b9803b2e0c1a020c121..ba52cecec7113c8399fdbee6f1551d90c5beafa7 100644 (file)
@@ -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;