]> granicus.if.org Git - php/commitdiff
Fix uninitialized value with extension traits
authorJohn Boehr <jbboehr@gmail.com>
Sun, 3 May 2015 21:29:19 +0000 (14:29 -0700)
committerXinchen Hui <laruence@php.net>
Mon, 4 May 2015 02:33:39 +0000 (10:33 +0800)
Zend/zend_compile.c

index 4e073fea76f1538b330388e99d4c4fbb2841903f..4e7370c49c2b10d211859a6b39c33aff3a0f910f 100644 (file)
@@ -3962,7 +3962,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;
                }
        }