Skip to content

Commit 33b8ef9

Browse files
committed
Do not optimize out ini_get() when the entry does not exist during compilation (#8507)
The entry may exist later if dl is enabled Fixes GH-8466
1 parent 3f1e1b9 commit 33b8ef9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/Optimizer/sccp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,9 @@ static inline int ct_eval_func_call(
939939

940940
ini_entry = zend_hash_find_ptr(EG(ini_directives), Z_STR_P(args[0]));
941941
if (!ini_entry) {
942+
if (PG(enable_dl)) {
943+
return FAILURE;
944+
}
942945
ZVAL_FALSE(result);
943946
} else if (ini_entry->modifiable != ZEND_INI_SYSTEM) {
944947
return FAILURE;

0 commit comments

Comments
 (0)