mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Fixed bug #76463 (var has array key type but not value type)
This commit is contained in:
parent
19d31433dc
commit
1cc9933130
3 changed files with 23 additions and 1 deletions
3
NEWS
3
NEWS
|
@ -12,6 +12,9 @@ PHP NEWS
|
||||||
- Interbase:
|
- Interbase:
|
||||||
. Fixed bug #76443 (php+php_interbase.dll crash on module_shutdown). (Kalle)
|
. Fixed bug #76443 (php+php_interbase.dll crash on module_shutdown). (Kalle)
|
||||||
|
|
||||||
|
- Opcache:
|
||||||
|
. Fixed bug #76463 (var has array key type but not value type). (Laruence)
|
||||||
|
|
||||||
- ZIP:
|
- ZIP:
|
||||||
. Fixed bug #76461 (OPSYS_Z_CPM defined instead of OPSYS_CPM).
|
. Fixed bug #76461 (OPSYS_Z_CPM defined instead of OPSYS_CPM).
|
||||||
(Dennis Birkholz, Remi)
|
(Dennis Birkholz, Remi)
|
||||||
|
|
|
@ -2406,7 +2406,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||||
if (t1 & MAY_BE_OBJECT) {
|
if (t1 & MAY_BE_OBJECT) {
|
||||||
tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
|
tmp |= MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
|
||||||
} else {
|
} else {
|
||||||
tmp |= ((t1 & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT) | MAY_BE_ARRAY_KEY_LONG;
|
tmp |= ((t1 & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT) | ((t1 & MAY_BE_ANY)? MAY_BE_ARRAY_KEY_LONG : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
UPDATE_SSA_TYPE(tmp, ssa_ops[i].result_def);
|
||||||
|
|
19
ext/opcache/tests/bug76463.phpt
Normal file
19
ext/opcache/tests/bug76463.phpt
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #76463 (var has array key type but not value type)
|
||||||
|
--INI--
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.optimization_level=-1
|
||||||
|
--SKIPIF--
|
||||||
|
<?php require_once('skipif.inc'); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function test() {
|
||||||
|
$old_data = isset($old_data) ? (array)$old_data : [];
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
okey
|
||||||
|
--EXPECT--
|
||||||
|
okey
|
Loading…
Add table
Add a link
Reference in a new issue