Skip to content

Assertion failure in ext/date/php_date.c #16037

Closed

Description

@YuanchengJiang

Description

The following code:

<?php
$d = new DateInterval('P2Y4DT6H8M');
$fusion = $d;
$u = [[]];
$fusion->__unserialize($u);

Resulted in this output:

/php-src/ext/date/php_date.c:4841: void restore_custom_dateinterval_properties(zval *, HashTable *): Assertion `!(((__ht)->u.flags & (1<<2)) != 0)' failed.
Aborted (core dumped)

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Activity

  1. DanielEScherzer commented on Sep 25, 2024

    @DanielEScherzer
    Member

    Minimal reproduction:

    <?php
    new DateInterval('P1Y')->__unserialize([[]]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions