Skip to content

zend_std_write_property() assertion failure with lazy objects #15999

Closed
@DanielEScherzer

Description

@DanielEScherzer

Description

The following code:

<?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 (34325c5)

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions