Commit:    d39aa984ad3ef79a8fc3db0cf8dc525a0738a7bc
Author:    Xinchen Hui <larue...@php.net>         Thu, 23 Aug 2012 16:06:17 
+0800
Parents:   6d1bebfcb0ad746cd0410d403a3812853a2cd457
Branches:  PHP-5.4

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=d39aa984ad3ef79a8fc3db0cf8dc525a0738a7bc

Log:
Refix #62358, previous has side-affect

Bugs:
https://bugs.php.net/62358

Changed paths:
  M  Zend/zend_compile.c


Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 21e5ca2..4ef4b97 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3786,6 +3786,7 @@ static int 
zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
                }
 
                fn->common.scope = ce;
+               fn->common.prototype = prototype;
 
                if (prototype
                        && (prototype->common.fn_flags & 
ZEND_ACC_IMPLEMENTED_ABSTRACT
@@ -3803,11 +3804,11 @@ static int 
zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
 
                /* one more thing: make sure we properly implement an abstract 
method */
                if (existing_fn && existing_fn->common.fn_flags & 
ZEND_ACC_ABSTRACT) {
+            prototype = fn->common.prototype;
                        do_inheritance_check_on_method(fn, existing_fn 
TSRMLS_CC);
+            fn->common.prototype = prototype;
                }
 
-               fn->common.prototype = prototype;
-
                /* delete inherited fn if the function to be added is not 
abstract */
                if (existing_fn
                        && existing_fn->common.scope != ce


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to