Skip to content

Commit 8d9da8d

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646c
2 parents 5f5eba1 + 3928b6b commit 8d9da8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4160,6 +4160,7 @@ static void preload_fix_trait_methods(zend_class_entry *ce)
41604160
static int preload_optimize(zend_persistent_script *script)
41614161
{
41624162
zend_class_entry *ce;
4163+
zend_persistent_script *tmp_script;
41634164

41644165
zend_shared_alloc_init_xlat_table();
41654166

@@ -4169,8 +4170,8 @@ static int preload_optimize(zend_persistent_script *script)
41694170
}
41704171
} ZEND_HASH_FOREACH_END();
41714172

4172-
ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4173-
ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4173+
ZEND_HASH_FOREACH_PTR(preload_scripts, tmp_script) {
4174+
ZEND_HASH_FOREACH_PTR(&tmp_script->script.class_table, ce) {
41744175
if (ce->ce_flags & ZEND_ACC_TRAIT) {
41754176
preload_register_trait_methods(ce);
41764177
}

0 commit comments

Comments
 (0)