Commit:    d77eb411ea5d80379ee92a908f543b91fa293383
Author:    Dmitry Stogov <dmi...@zend.com>         Mon, 18 Feb 2013 16:20:49 
+0400
Parents:   91538e4e13908a8cfcb25c5286e4222ef4077a7e 
42437dd870de28eee6c9127f4c7e7c78ba8e0152
Branches:  PHP-5.5 master

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

Log:
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Fixed bug #64070 (Inheritance with Traits failed with error)

Conflicts:
        NEWS
        Zend/zend_compile.c

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

Changed paths:
  MM  Zend/zend_compile.c


Diff:
diff --cc Zend/zend_compile.c
index 1a8d108,a3f4fe5..7011511
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@@ -3974,8 -3785,8 +3974,8 @@@ static int zend_traits_copy_functions(z
        ce            = va_arg(args, zend_class_entry*);
        overriden     = va_arg(args, HashTable**);
        exclude_table = va_arg(args, HashTable*);
 -      
 +
-       fnname_len = strlen(fn->common.function_name);
+       fnname_len = hash_key->nKeyLength - 1;
  
        /* apply aliases which are qualified with a class name, there should 
not be any ambiguity */
        if (ce->trait_aliases) {
@@@ -3986,11 -3797,11 +3986,11 @@@
                        if (alias->alias != NULL
                                && (!alias->trait_method->ce || 
fn->common.scope == alias->trait_method->ce)
                                && alias->trait_method->mname_len == fnname_len
-                               && 
(zend_binary_strcasecmp(alias->trait_method->method_name, 
alias->trait_method->mname_len, fn->common.function_name, fnname_len) == 0)) {
+                               && 
(zend_binary_strcasecmp(alias->trait_method->method_name, 
alias->trait_method->mname_len, hash_key->arKey, fnname_len) == 0)) {
                                fn_copy = *fn;
 -                                      
 +
                                /* if it is 0, no modifieres has been changed */
 -                              if (alias->modifiers) { 
 +                              if (alias->modifiers) {
                                        fn_copy.common.fn_flags = 
alias->modifiers | (fn->common.fn_flags ^ (fn->common.fn_flags & 
ZEND_ACC_PPP_MASK));
                                }


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

Reply via email to