Skip to content

Commit b1be5a0

Browse files
committed
Disable constant array_flip() evaluation
1 parent 7a5b059 commit b1be5a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/opcache/Optimizer/sccp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,9 @@ static inline int ct_eval_func_call(
571571

572572
if ((zend_string_equals_literal(name, "array_keys")
573573
|| zend_string_equals_literal(name, "array_values")
574-
|| zend_string_equals_literal(name, "array_flip"))
575-
&& num_args == 1
574+
// TODO: array_flip may throw warnings if the array contains non-int/string values
575+
// || zend_string_equals_literal(name, "array_flip")
576+
) && num_args == 1
576577
&& Z_TYPE_P(args[0]) == IS_ARRAY) {
577578
/* pass */
578579
} else if (zend_string_equals_literal(name, "str_repeat")

0 commit comments

Comments
 (0)