mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

This issue only applies to debug builds: read_property can free the object, but we'd try to check the object handlers afterwards. Rewrite the check in a way that only accessed the object before the read_property call. Fixes oss-fuzz #38297.
15 lines
190 B
PHP
15 lines
190 B
PHP
--TEST--
|
|
Destroy object in magic __get()
|
|
--FILE--
|
|
<?php
|
|
class Test {
|
|
function __get($name) {
|
|
$GLOBALS["x"] = null;
|
|
}
|
|
}
|
|
$x = new Test;
|
|
var_dump($x->prop);
|
|
|
|
?>
|
|
--EXPECT--
|
|
NULL
|