summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_persist_calc.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-12-10 13:07:04 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-12-10 13:12:29 +0100
commit5cdea8d5e87570fada17c3f7ed8c5886f81f0cc7 (patch)
tree241fab6f8f67e619a94bfdba729d81ca919c6719 /ext/opcache/zend_persist_calc.c
parent33f7cabbf0c5f33b65c8106e2dc1ebc513f67df3 (diff)
parentbaf3a9133bf0bc7069e5191b780c221485b2dda6 (diff)
downloadphp-git-5cdea8d5e87570fada17c3f7ed8c5886f81f0cc7.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Add support for class_alias to preloading Fixed bug #78935: Check that all linked classes can be preloaded
Diffstat (limited to 'ext/opcache/zend_persist_calc.c')
-rw-r--r--ext/opcache/zend_persist_calc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c
index c4aa4adf5e..830a5dd8b0 100644
--- a/ext/opcache/zend_persist_calc.c
+++ b/ext/opcache/zend_persist_calc.c
@@ -370,6 +370,12 @@ static void zend_persist_class_entry_calc(zval *zv)
Bucket *p;
if (ce->type == ZEND_USER_CLASS) {
+ /* The same zend_class_entry may be reused by class_alias */
+ if (zend_shared_alloc_get_xlat_entry(ce)) {
+ return;
+ }
+ zend_shared_alloc_register_xlat_entry(ce, ce);
+
check_property_type_resolution(ce);
ZCG(is_immutable_class) =