diff options
author | Dmitry Stogov <dmitry@zend.com> | 2013-01-09 17:52:48 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2013-01-09 17:52:48 +0400 |
commit | c3ebd6305ec4325827b7c4b9adc322820e124b26 (patch) | |
tree | 53d21a0e6ef9b4027e3a1eea4430e8ffc5f5007b /Zend | |
parent | 326f896739785cfcd36ef918dbd399ac605f6552 (diff) | |
parent | 625000ab442dd4c1bfc6975a4a979f2c5f60a78d (diff) | |
download | php-git-c3ebd6305ec4325827b7c4b9adc322820e124b26.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
Fixed compilator bug that might cause jump depended on unitialized value
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_compile.c | 3 | ||||
-rw-r--r-- | Zend/zend_language_parser.y | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 5e2d32b157..101662cfe7 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4933,6 +4933,7 @@ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name /* Prefix class name with name of current namespace */ znode tmp; + tmp.op_type = IS_CONST; tmp.u.constant = *CG(current_namespace); zval_copy_ctor(&tmp.u.constant); zend_do_build_namespace_name(&tmp, &tmp, class_name TSRMLS_CC); @@ -5069,7 +5070,7 @@ void zend_do_end_class_declaration(const znode *class_token, const znode *parent } if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) - && ((parent_token->op_type != IS_UNUSED) || (ce->num_interfaces > 0))) { + && (parent_token || (ce->num_interfaces > 0))) { zend_verify_abstract_class(ce TSRMLS_CC); if (ce->num_interfaces && !(ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS)) { do_verify_abstract_class(TSRMLS_C); diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index e65910d2d5..781d806fe7 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -386,13 +386,13 @@ unticked_class_declaration_statement: implements_list '{' class_statement_list - '}' { zend_do_end_class_declaration(&$1, &$2 TSRMLS_CC); } + '}' { zend_do_end_class_declaration(&$1, &$3 TSRMLS_CC); } | interface_entry T_STRING { zend_do_begin_class_declaration(&$1, &$2, NULL TSRMLS_CC); } interface_extends_list '{' class_statement_list - '}' { zend_do_end_class_declaration(&$1, &$2 TSRMLS_CC); } + '}' { zend_do_end_class_declaration(&$1, NULL TSRMLS_CC); } ; |