Skip to content

SplFixedArray assertion failure with get_object_vars #17198

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
class MySplFixedArray extends SplFixedArray {
public $x;
}
class X {}
$array = new MySplFixedArray(2);
$array->{0} = new X();
try {get_object_vars($array);} catch (Exception $e) { echo($e); }

Resulted in this output:

php: /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/zend_hash.c:1163: zval *_zend_hash_index_add_or_update_i(HashTable *, zend_ulong, zval *, uint32_t): Assertion `(flag & (1<<3)) == 0' failed.
Aborted (core dumped)

PHP Version

nightly

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions