[php-src] Issue #15999: zend_std_write_property() assertion failure with lazy objects
| From: | DanielEScherzer | Date: | Mon, 23 Sep 2024 01:33:33 +0000 |
| Subject: | [php-src] Issue #15999: zend_std_write_property() assertion failure with lazy objects | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247863@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15999
Author: DanielEScherzer
### Description
The following code:
```php
<?php
class C {
public $s;
}
$r = new ReflectionClass( C::class );
$o = $r->newLazyGhost(
function ( $obj ) {
global $o;
$o = null;
}
);
$o->s = $o;
```
Resulted in this output:
```
php: /usr/src/php/Zend/zend_object_handlers.c:964: zend_std_write_property: Assertion
`!(zval_get_type(&(*(value))) == 10)' failed.
Aborted
```
But I expected this output instead:
```
[no assertion failure]
```
### PHP Version
PHP 8.4 dev (34325c5e3a)
### Operating System
_No response_