mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fixed bug #75687 (var 8 (TMP) has array key type but not value type)
This commit is contained in:
parent
eb77c2c2a7
commit
a20c9bd3fe
4
NEWS
4
NEWS
@ -5,6 +5,10 @@ PHP NEWS
|
||||
- Core:
|
||||
. Fixed bug #75679 (Path 260 character problem). (Anatol)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #75687 (var 8 (TMP) has array key type but not value type).
|
||||
(Laruence)
|
||||
|
||||
- PGSQL:
|
||||
. Fixed bug #75671 (pg_version() crashes when called on a connection to
|
||||
cockroach). (magicaltux at gmail dot com)
|
||||
|
@ -3338,6 +3338,9 @@ int zend_infer_types_ex(const zend_op_array *op_array, const zend_script *script
|
||||
/* Ignore the constraint (either ce instanceof constraint->ce or
|
||||
* they are unrelated, as far as we can statically determine) */
|
||||
}
|
||||
} else if ((tmp & MAY_BE_ANY) == 0) {
|
||||
/* FIXME: usage in unreachable block */
|
||||
tmp |= MAY_BE_UNDEF;
|
||||
}
|
||||
}
|
||||
|
||||
|
21
ext/opcache/tests/bug75687.phpt
Normal file
21
ext/opcache/tests/bug75687.phpt
Normal file
@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #75687 (var 8 (TMP) 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 x($y)
|
||||
{
|
||||
if (is_array($y)) {
|
||||
$z = is_array($y) ? array() : array($y);
|
||||
}
|
||||
}
|
||||
?>
|
||||
okey
|
||||
--EXPECT--
|
||||
okey
|
Loading…
Reference in New Issue
Block a user