1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/oss_fuzz_429429090.phpt
Ilija Tovilo 8b4ef3a09f Fix FETCH_OBJ_UNSET IS_UNDEF result
UNSET_OBJ et al. do not expect to find IS_UNDEF results for IS_INDIRECT vars. To
solve this, return IS_NULL from FETCH_OBJ_UNSET when properties are
uninitialized. Do the same for FETCH_STATIC_PROP_IS, as we're otherwise copying
IS_UNDEF into the VAR result, which is not a valid value for VAR.

Fixes OSS-Fuzz #429429090
Closes GH-19160
2026-01-16 19:27:21 +01:00

21 lines
268 B
PHP

--TEST--
OSS-Fuzz #429429090: FETCH_OBJ_UNSET IS_UNDEF result
--FILE--
<?php
class C {
public D $x;
static D $y;
}
$c = new C();
isset($c->x[0]->prop);
unset($c->x[0]->prop);
isset(C::$y[0]->prop);
unset(C::$y[0]->prop);
?>
===DONE===
--EXPECT--
===DONE===