mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
Fixed bug #79193
This commit is contained in:
parent
be7eab3202
commit
f70b552326
2
NEWS
2
NEWS
@ -39,6 +39,8 @@ PHP NEWS
|
||||
. Fixed bug #79114 (Eval class during preload causes class to be only half
|
||||
available). (Laruence)
|
||||
. Fixed bug #79128 (Preloading segfaults if preload_user is used). (Nikita)
|
||||
. Fixed bug #79193 (Incorrect type inference for self::$field =& $field).
|
||||
(Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #79145 (openssl memory leak). (cmb, Nikita)
|
||||
|
@ -2999,6 +2999,13 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
||||
UPDATE_SSA_TYPE(tmp, ssa_ops[i].op1_def);
|
||||
}
|
||||
break;
|
||||
case ZEND_ASSIGN_STATIC_PROP_REF:
|
||||
if ((opline+1)->op1_type == IS_CV) {
|
||||
opline++;
|
||||
i++;
|
||||
UPDATE_SSA_TYPE(MAY_BE_REF, ssa_ops[i].op1_def);
|
||||
}
|
||||
break;
|
||||
case ZEND_BIND_GLOBAL:
|
||||
tmp = MAY_BE_REF | MAY_BE_ANY
|
||||
| MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
|
||||
|
18
ext/opcache/tests/bug79193.phpt
Normal file
18
ext/opcache/tests/bug79193.phpt
Normal file
@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #79193: Incorrect type inference for self::$field =& $field
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public static $foo;
|
||||
public static function method($bar) {
|
||||
Test::$foo =& $bar;
|
||||
var_dump(is_int($bar));
|
||||
}
|
||||
}
|
||||
|
||||
Test::method(1);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
Loading…
Reference in New Issue
Block a user