From: Dmitry Stogov Date: Tue, 25 Dec 2018 20:30:59 +0000 (+0300) Subject: Fixed crashes introduced by 7e597f48e9fda982e930e4f617d2b2d98d8878a5 (only master... X-Git-Tag: php-7.4.0alpha1~1354 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=636b16402b7c086e51d80d709508391aa95ebed3;p=php Fixed crashes introduced by 7e597f48e9fda982e930e4f617d2b2d98d8878a5 (only master was affected) --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 73cf0e75e3..11a5256657 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4057,7 +4057,10 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type) /* {{ fbc = zend_hash_find_ptr(&ce->function_table, lcname); if (fbc && !(fbc->common.fn_flags & ZEND_ACC_PUBLIC)) { if (ce != CG(active_class_entry) - &&((fbc->common.fn_flags & ZEND_ACC_PRIVATE) + && ((fbc->common.fn_flags & ZEND_ACC_PRIVATE) + || !(fbc->common.scope->ce_flags & ZEND_ACC_LINKED) + || (CG(active_class_entry) + && !(CG(active_class_entry)->ce_flags & ZEND_ACC_LINKED)) || !zend_check_protected(zend_get_function_root_class(fbc), CG(active_class_entry)))) { /* incompatibe function */ fbc = NULL;