php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #69566
Patch extension_trait_issue revision 2015-05-03 21:38 UTC by jbboehr at gmail dot com

Patch extension_trait_issue for Unknown/Other Function Bug #69566

Patch version 2015-05-03 21:38 UTC

Return to Bug #69566 | Download this patch
Patch Revisions:

Developer: jbboehr@gmail.com

diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 0f343e7..d2f9fbc 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4101,7 +4101,7 @@ static int zend_fixup_trait_method(zend_function *fn, zend_class_entry *ce TSRML
                if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
                        ce->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
                }
-               if (fn->op_array.static_variables) {
+               if (fn->type == ZEND_USER_FUNCTION && fn->op_array.static_variables) {
                        ce->ce_flags |= ZEND_HAS_STATIC_IN_METHODS;
                }
        }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 08:01:27 2024 UTC