summaryrefslogtreecommitdiff
path: root/ext/opcache/ZendAccelerator.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2020-09-29 12:13:17 +0300
committerDmitry Stogov <dmitry@zend.com>2020-09-29 12:13:17 +0300
commit8d9da8df28e2eb878cf077afe5f5767d022bf4ad (patch)
tree0b60e7d5f96c7f3ff1827549964d55d31bc122f8 /ext/opcache/ZendAccelerator.c
parent5f5eba1d7ade71c48d575547f6f8d9d73e23a9f9 (diff)
parent3928b6b435f6c7c818e8211b2ecdeeb7191310d1 (diff)
downloadphp-git-8d9da8df28e2eb878cf077afe5f5767d022bf4ad.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf459
Diffstat (limited to 'ext/opcache/ZendAccelerator.c')
-rw-r--r--ext/opcache/ZendAccelerator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 23ea50a4e3..53ad1b0169 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -4160,6 +4160,7 @@ static void preload_fix_trait_methods(zend_class_entry *ce)
static int preload_optimize(zend_persistent_script *script)
{
zend_class_entry *ce;
+ zend_persistent_script *tmp_script;
zend_shared_alloc_init_xlat_table();
@@ -4169,8 +4170,8 @@ static int preload_optimize(zend_persistent_script *script)
}
} ZEND_HASH_FOREACH_END();
- ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
- ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
+ ZEND_HASH_FOREACH_PTR(preload_scripts, tmp_script) {
+ ZEND_HASH_FOREACH_PTR(&tmp_script->script.class_table, ce) {
if (ce->ce_flags & ZEND_ACC_TRAIT) {
preload_register_trait_methods(ce);
}