From 0ff71aead12bbc2e7dc57f00f7860a6ffdccea4d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 25 Jan 2019 11:53:31 +0300 Subject: [PATCH] Fixed crash --- ext/opcache/Optimizer/zend_inference.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index 69ccda0d06..648e4e621c 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2285,7 +2285,8 @@ static zend_property_info *lookup_prop_info(zend_class_entry *ce, zend_string *n zend_property_info *prop_info; /* If the class is linked, reuse the precise runtime logic. */ - if (ce->ce_flags & ZEND_ACC_LINKED) { + if ((ce->ce_flags & ZEND_ACC_LINKED) + && (!scope || (scope->ce_flags & ZEND_ACC_LINKED))) { zend_class_entry *prev_scope = EG(fake_scope); EG(fake_scope) = scope; prop_info = zend_get_property_info(ce, name, 1); -- 2.50.1