From 08ffc9a552c7cf4fbff1a4b3d2de4e7c33f4120d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 7 Nov 2018 15:34:39 +0300 Subject: [PATCH] Resolve constants only in linked classes --- ext/opcache/ZendAccelerator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 36e93b3cb7a..5561ef482d8 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3308,7 +3308,8 @@ static void preload_link(void) if (ce->type == ZEND_INTERNAL_CLASS) { break; } - if (!(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { + if ((ce->ce_flags & ZEND_ACC_LINKED) + && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) { zend_bool ok = 1; zend_class_constant *c; zval *val;