Patch bug61529.patch for Scripting Engine problem Bug #61529
Patch version 2012-03-29 12:49 UTC
Return to Bug #61529 |
Download this patch
Patch Revisions:
Developer: laruence@php.net
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index d0730b7..f0451fd 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -302,7 +302,6 @@ unticked_statement:
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML { zend_do_echo(&$1 TSRMLS_CC); }
| expr ';' { zend_do_free(&$1 TSRMLS_CC); }
- | T_UNSET '(' unset_variables ')' ';'
| T_FOREACH '(' variable T_AS
{ zend_do_foreach_begin(&$1, &$2, &$3, &$4, 1 TSRMLS_CC); }
foreach_variable foreach_optional_arg ')' { zend_do_foreach_cont(&$1, &$2, &$4, &$6, &$7 TSRMLS_CC); }
@@ -779,13 +778,13 @@ expr_without_variable:
| expr '?' ':' { zend_do_jmp_set(&$1, &$2, &$3 TSRMLS_CC); }
expr { zend_do_jmp_set_else(&$$, &$5, &$2, &$3 TSRMLS_CC); }
| internal_functions_in_yacc { $$ = $1; }
+ | T_UNSET_CAST expr { zend_do_cast(&$$, &$2, IS_NULL TSRMLS_CC); }
| T_INT_CAST expr { zend_do_cast(&$$, &$2, IS_LONG TSRMLS_CC); }
| T_DOUBLE_CAST expr { zend_do_cast(&$$, &$2, IS_DOUBLE TSRMLS_CC); }
| T_STRING_CAST expr { zend_do_cast(&$$, &$2, IS_STRING TSRMLS_CC); }
| T_ARRAY_CAST expr { zend_do_cast(&$$, &$2, IS_ARRAY TSRMLS_CC); }
| T_OBJECT_CAST expr { zend_do_cast(&$$, &$2, IS_OBJECT TSRMLS_CC); }
| T_BOOL_CAST expr { zend_do_cast(&$$, &$2, IS_BOOL TSRMLS_CC); }
- | T_UNSET_CAST expr { zend_do_cast(&$$, &$2, IS_NULL TSRMLS_CC); }
| T_EXIT exit_expr { zend_do_exit(&$$, &$2 TSRMLS_CC); }
| '@' { zend_do_begin_silence(&$1 TSRMLS_CC); } expr { zend_do_end_silence(&$1 TSRMLS_CC); $$ = $3; }
| scalar { $$ = $1; }
@@ -1148,6 +1147,7 @@ encaps_var_offset:
internal_functions_in_yacc:
T_ISSET '(' isset_variables ')' { $$ = $3; }
+ | T_UNSET '(' unset_variables ')'
| T_EMPTY '(' variable ')' { zend_do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 TSRMLS_CC); }
| T_INCLUDE expr { zend_do_include_or_eval(ZEND_INCLUDE, &$$, &$2 TSRMLS_CC); }
| T_INCLUDE_ONCE expr { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 TSRMLS_CC); }
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 3f6189e..5feb3d3 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Mar 1 21:27:30 2012 */
+/* Generated by re2c 0.13.5 on Wed Mar 28 21:05:33 2012 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
diff --git a/Zend/zend_language_scanner_defs.h b/Zend/zend_language_scanner_defs.h
index 015a903..d5c1ada 100644
--- a/Zend/zend_language_scanner_defs.h
+++ b/Zend/zend_language_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Mar 1 21:27:30 2012 */
+/* Generated by re2c 0.13.5 on Wed Mar 28 21:05:34 2012 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index be10bc4..de088e9 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Sun Jan 1 10:36:31 2012 */
+/* Generated by re2c 0.13.5 on Wed Mar 28 21:05:32 2012 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -427,7 +427,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
-#line 425 "ext/standard/var_unserializer.c"
+#line 431 "ext/standard/var_unserializer.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -487,9 +487,9 @@ yy2:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy95;
yy3:
-#line 747 "ext/standard/var_unserializer.re"
+#line 753 "ext/standard/var_unserializer.re"
{ return 0; }
-#line 487 "ext/standard/var_unserializer.c"
+#line 493 "ext/standard/var_unserializer.c"
yy4:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy89;
@@ -532,13 +532,13 @@ yy13:
goto yy3;
yy14:
++YYCURSOR;
-#line 741 "ext/standard/var_unserializer.re"
+#line 747 "ext/standard/var_unserializer.re"
{
/* this is the case where we have less data than planned */
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of serialized data");
return 0; /* not sure if it should be 0 or 1 here? */
}
-#line 536 "ext/standard/var_unserializer.c"
+#line 542 "ext/standard/var_unserializer.c"
yy16:
yych = *++YYCURSOR;
goto yy3;
@@ -568,7 +568,7 @@ yy20:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 624 "ext/standard/var_unserializer.re"
+#line 630 "ext/standard/var_unserializer.re"
{
size_t len, len2, len3, maxlen;
long elements;
@@ -685,7 +685,7 @@ yy20:
return object_common2(UNSERIALIZE_PASSTHRU, elements);
}
-#line 683 "ext/standard/var_unserializer.c"
+#line 689 "ext/standard/var_unserializer.c"
yy25:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -710,7 +710,7 @@ yy27:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 616 "ext/standard/var_unserializer.re"
+#line 622 "ext/standard/var_unserializer.re"
{
INIT_PZVAL(*rval);
@@ -718,7 +718,7 @@ yy27:
return object_common2(UNSERIALIZE_PASSTHRU,
object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR));
}
-#line 716 "ext/standard/var_unserializer.c"
+#line 722 "ext/standard/var_unserializer.c"
yy32:
yych = *++YYCURSOR;
if (yych == '+') goto yy33;
@@ -739,7 +739,7 @@ yy34:
yych = *++YYCURSOR;
if (yych != '{') goto yy18;
++YYCURSOR;
-#line 596 "ext/standard/var_unserializer.re"
+#line 602 "ext/standard/var_unserializer.re"
{
long elements = parse_iv(start + 2);
/* use iv() not uiv() in order to check data range */
@@ -759,7 +759,7 @@ yy34:
return finish_nested_data(UNSERIALIZE_PASSTHRU);
}
-#line 757 "ext/standard/var_unserializer.c"
+#line 763 "ext/standard/var_unserializer.c"
yy39:
yych = *++YYCURSOR;
if (yych == '+') goto yy40;
@@ -780,7 +780,7 @@ yy41:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 567 "ext/standard/var_unserializer.re"
+#line 573 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
char *str;
@@ -809,7 +809,7 @@ yy41:
ZVAL_STRINGL(*rval, str, len, 0);
return 1;
}
-#line 807 "ext/standard/var_unserializer.c"
+#line 813 "ext/standard/var_unserializer.c"
yy46:
yych = *++YYCURSOR;
if (yych == '+') goto yy47;
@@ -830,7 +830,7 @@ yy48:
yych = *++YYCURSOR;
if (yych != '"') goto yy18;
++YYCURSOR;
-#line 539 "ext/standard/var_unserializer.re"
+#line 545 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
char *str;
@@ -858,7 +858,7 @@ yy48:
ZVAL_STRINGL(*rval, str, len, 1);
return 1;
}
-#line 856 "ext/standard/var_unserializer.c"
+#line 862 "ext/standard/var_unserializer.c"
yy53:
yych = *++YYCURSOR;
if (yych <= '/') {
@@ -946,7 +946,7 @@ yy61:
}
yy63:
++YYCURSOR;
-#line 529 "ext/standard/var_unserializer.re"
+#line 535 "ext/standard/var_unserializer.re"
{
#if SIZEOF_LONG == 4
use_double:
@@ -956,7 +956,7 @@ use_double:
ZVAL_DOUBLE(*rval, zend_strtod((const char *)start + 2, NULL));
return 1;
}
-#line 954 "ext/standard/var_unserializer.c"
+#line 960 "ext/standard/var_unserializer.c"
yy65:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1015,7 +1015,7 @@ yy73:
yych = *++YYCURSOR;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 514 "ext/standard/var_unserializer.re"
+#line 520 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
INIT_PZVAL(*rval);
@@ -1030,7 +1030,7 @@ yy73:
return 1;
}
-#line 1028 "ext/standard/var_unserializer.c"
+#line 1034 "ext/standard/var_unserializer.c"
yy76:
yych = *++YYCURSOR;
if (yych == 'N') goto yy73;
@@ -1057,7 +1057,7 @@ yy79:
if (yych <= '9') goto yy79;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 487 "ext/standard/var_unserializer.re"
+#line 493 "ext/standard/var_unserializer.re"
{
#if SIZEOF_LONG == 4
int digits = YYCURSOR - start - 3;
@@ -1084,7 +1084,7 @@ yy79:
ZVAL_LONG(*rval, parse_iv(start + 2));
return 1;
}
-#line 1082 "ext/standard/var_unserializer.c"
+#line 1088 "ext/standard/var_unserializer.c"
yy83:
yych = *++YYCURSOR;
if (yych <= '/') goto yy18;
@@ -1092,24 +1092,24 @@ yy83:
yych = *++YYCURSOR;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 480 "ext/standard/var_unserializer.re"
+#line 486 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
INIT_PZVAL(*rval);
ZVAL_BOOL(*rval, parse_iv(start + 2));
return 1;
}
-#line 1097 "ext/standard/var_unserializer.c"
+#line 1103 "ext/standard/var_unserializer.c"
yy87:
++YYCURSOR;
-#line 473 "ext/standard/var_unserializer.re"
+#line 479 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
INIT_PZVAL(*rval);
ZVAL_NULL(*rval);
return 1;
}
-#line 1107 "ext/standard/var_unserializer.c"
+#line 1113 "ext/standard/var_unserializer.c"
yy89:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1132,7 +1132,7 @@ yy91:
if (yych <= '9') goto yy91;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 450 "ext/standard/var_unserializer.re"
+#line 456 "ext/standard/var_unserializer.re"
{
long id;
@@ -1155,7 +1155,7 @@ yy91:
return 1;
}
-#line 1153 "ext/standard/var_unserializer.c"
+#line 1159 "ext/standard/var_unserializer.c"
yy95:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1178,7 +1178,7 @@ yy97:
if (yych <= '9') goto yy97;
if (yych != ';') goto yy18;
++YYCURSOR;
-#line 429 "ext/standard/var_unserializer.re"
+#line 435 "ext/standard/var_unserializer.re"
{
long id;
@@ -1199,9 +1199,9 @@ yy97:
return 1;
}
-#line 1197 "ext/standard/var_unserializer.c"
+#line 1203 "ext/standard/var_unserializer.c"
}
-#line 749 "ext/standard/var_unserializer.re"
+#line 755 "ext/standard/var_unserializer.re"
return 0;
|