mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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
21 lines
268 B
PHP
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===
|