We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7e565da + 3733750 commit e05f366Copy full SHA for e05f366
Zend/Optimizer/zend_inference.c
@@ -2126,7 +2126,7 @@ static uint32_t assign_dim_result_type(
2126
* key type exists iff a value type exists even in dead code that may use empty types. */
2127
if (value_type & (MAY_BE_ANY|MAY_BE_UNDEF)) {
2128
if (value_type & MAY_BE_UNDEF) {
2129
- tmp |= MAY_BE_ARRAY_OF_NULL;
+ value_type |= MAY_BE_NULL;
2130
}
2131
if (dim_op_type == IS_UNUSED) {
2132
tmp |= MAY_BE_HASH_ONLY(arr_type) ? MAY_BE_ARRAY_NUMERIC_HASH : MAY_BE_ARRAY_KEY_LONG;
ext/opcache/tests/invalid_array_key_type.phpt
@@ -13,6 +13,9 @@ function test(\SplObjectStorage $definitions = null) {
13
$definitions[$argument] = 1;
14
$definitions[$argument] += 1;
15
16
+function test2() {
17
+ $a[[]] = $undef;
18
+}
19
20
?>
21
===DONE===
0 commit comments