Skip to content

Commit 3928b6b

Browse files
committed
Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646c
1 parent e08f691 commit 3928b6b

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
@@ -4078,6 +4078,7 @@ static void preload_fix_trait_methods(zend_class_entry *ce)
40784078
static int preload_optimize(zend_persistent_script *script)
40794079
{
40804080
zend_class_entry *ce;
4081+
zend_persistent_script *tmp_script;
40814082

40824083
zend_shared_alloc_init_xlat_table();
40834084

@@ -4087,8 +4088,8 @@ static int preload_optimize(zend_persistent_script *script)
40874088
}
40884089
} ZEND_HASH_FOREACH_END();
40894090

4090-
ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
4091-
ZEND_HASH_FOREACH_PTR(&script->script.class_table, ce) {
4091+
ZEND_HASH_FOREACH_PTR(preload_scripts, tmp_script) {
4092+
ZEND_HASH_FOREACH_PTR(&tmp_script->script.class_table, ce) {
40924093
if (ce->ce_flags & ZEND_ACC_TRAIT) {
40934094
preload_register_trait_methods(ce);
40944095
}

0 commit comments

Comments
 (0)