php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch echo_tags-patch for Scripting Engine problem Bug #50662Patch version 2010-11-19 11:31 UTC Return to Bug #50662 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: ww.galen@gmail.comIndex: sapi/cli/php_cli_readline.c =================================================================== --- sapi/cli/php_cli_readline.c (revision 305556) +++ sapi/cli/php_cli_readline.c (working copy) @@ -230,6 +230,7 @@ case outside: if ((CG(short_tags) && !strncmp(code+i-1, "<?", 2)) || (CG(asp_tags) && !strncmp(code+i-1, "<%", 2)) + || (!strncmp(code+i-1, "<?=", 3)) || (i > 3 && !strncmp(code+i-4, "<?php", 5)) ) { code_type = body; Index: Zend/zend_language_scanner.l =================================================================== --- Zend/zend_language_scanner.l (revision 305556) +++ Zend/zend_language_scanner.l (working copy) @@ -1528,15 +1528,11 @@ <INITIAL>"<?=" { - if (CG(short_tags)) { - zendlval->value.str.val = yytext; /* no copying - intentional */ - zendlval->value.str.len = yyleng; - zendlval->type = IS_STRING; - BEGIN(ST_IN_SCRIPTING); - return T_OPEN_TAG_WITH_ECHO; - } else { - goto inline_char_handler; - } + zendlval->value.str.val = yytext; /* no copying - intentional */ + zendlval->value.str.len = yyleng; + zendlval->type = IS_STRING; + BEGIN(ST_IN_SCRIPTING); + return T_OPEN_TAG_WITH_ECHO; } Index: Zend/zend_language_scanner.c =================================================================== --- Zend/zend_language_scanner.c (revision 305556) +++ Zend/zend_language_scanner.c (working copy) @@ -961,7 +961,7 @@ if (YYCURSOR < YYLIMIT) { switch (*YYCURSOR) { case '?': - if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */ + if (CG(short_tags) || (*(YYCURSOR + 1) == '=') || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */ break; } continue; @@ -1309,15 +1309,11 @@ yyleng = YYCURSOR - SCNG(yy_text); #line 1526 "Zend/zend_language_scanner.l" { - if (CG(short_tags)) { zendlval->value.str.val = yytext; /* no copying - intentional */ zendlval->value.str.len = yyleng; zendlval->type = IS_STRING; BEGIN(ST_IN_SCRIPTING); return T_OPEN_TAG_WITH_ECHO; - } else { - goto inline_char_handler; - } } #line 1323 "Zend/zend_language_scanner.c" yy47: |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Sat May 18 01:01:33 2024 UTC |