File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -3502,6 +3502,10 @@ static zend_always_inline int _zend_update_type_info(
35023502 tmp &= ~MAY_BE_RC1 ;
35033503 }
35043504 }
3505+ if (opline -> opcode == ZEND_FETCH_OBJ_IS ) {
3506+ /* IS check may return null for uninitialized typed property. */
3507+ tmp |= MAY_BE_NULL ;
3508+ }
35053509 }
35063510 UPDATE_SSA_TYPE (tmp , ssa_op -> result_def );
35073511 if (ce ) {
Original file line number Diff line number Diff line change 1+ --TEST--
2+ FETCH_OBJ_IS on typed object property
3+ --INI--
4+ opcache.enable=1
5+ opcache.enable_cli=1
6+ opcache.file_update_protection=0
7+ opcache.jit_buffer_size=1M
8+ --FILE--
9+ <?php
10+
11+ class Test {
12+ public stdClass $ data ;
13+ }
14+
15+ function test () {
16+ $ test = new Test ;
17+ var_dump (isset ($ test ->data [0 ]));
18+ }
19+
20+ test ();
21+
22+ ?>
23+ --EXPECT--
24+ bool(false)
You can’t perform that action at this time.
0 commit comments