]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorDmitry Stogov <dmitry@zend.com>
Thu, 14 Feb 2019 10:18:45 +0000 (13:18 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 14 Feb 2019 10:18:45 +0000 (13:18 +0300)
* PHP-7.4:
  Fixed bug #77613 (method visibility change) (reverted ZEND_ACC_CTOR and ZEND_ACC_DTOR flags removal)

1  2 
Zend/zend_API.c
Zend/zend_builtin_functions.c
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_inheritance.c
ext/reflection/php_reflection.c

diff --cc Zend/zend_API.c
index 0b745161ff5da9ded2e1ee8010a180e8cc3d67f2,f191ca25b98a3f18c8e82f8fb9439947724cb5af..c03b6bfa5bd86be860d231c40f7aca9398ebd4bf
@@@ -2317,8 -2344,10 +2318,9 @@@ ZEND_API int zend_register_functions(ze
                        if (ctor->common.fn_flags & ZEND_ACC_STATIC) {
                                zend_error(error_type, "Constructor %s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(ctor->common.function_name));
                        }
 -                      ctor->common.fn_flags &= ~ZEND_ACC_ALLOW_STATIC;
                }
                if (dtor) {
+                       dtor->common.fn_flags |= ZEND_ACC_DTOR;
                        if (dtor->common.fn_flags & ZEND_ACC_STATIC) {
                                zend_error(error_type, "Destructor %s::%s() cannot be static", ZSTR_VAL(scope->name), ZSTR_VAL(dtor->common.function_name));
                        }
Simple merge
index 1ebc7c1bf353c4ff896a6f19a7cab160c0c3920c,03f8cf25638d48e09bb16b367670f4e65242f4ea..33e6e47e9cf988cb16e0c2afec1cc4fbe40474a1
@@@ -6217,7 -6264,13 +6217,8 @@@ void zend_compile_class_decl(zend_ast *
        /* Reset lineno for final opcodes and errors */
        CG(zend_lineno) = ast->lineno;
  
 -      if (!(ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS)) {
 -              /* For traits this check is delayed until after trait binding */
 -              zend_check_deprecated_constructor(ce);
 -      }
 -
        if (ce->constructor) {
+               ce->constructor->common.fn_flags |= ZEND_ACC_CTOR;
                if (ce->constructor->common.fn_flags & ZEND_ACC_STATIC) {
                        zend_error_noreturn(E_COMPILE_ERROR, "Constructor %s::%s() cannot be static",
                                ZSTR_VAL(ce->name), ZSTR_VAL(ce->constructor->common.function_name));
Simple merge
Simple merge
Simple merge