Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
YuanchengJiang opened this issue Sep 25, 2024 · 1 comment
Closed

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

YuanchengJiang opened this issue Sep 25, 2024 · 1 comment

Comments

@YuanchengJiang
Copy link

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

@DanielEScherzer
Copy link
Contributor

DanielEScherzer commented Sep 25, 2024

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
Projects
None yet
Development

No branches or pull requests

4 participants