[php-src] Issue #8152: Cannot hydrate a DateTime instance created without the constructor
| From: | nikic | Date: | Thu, 24 Feb 2022 21:43:26 +0000 |
| Subject: | [php-src] Issue #8152: Cannot hydrate a DateTime instance created without the constructor | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240021@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8152
Comment Author: nikic
Why not use
DateTime::__set_state(['date' => ...])?
Though I do think that we also need to migrate away from __wakeup to
__unserialize to avoid the reliance on temporary dynamic properties. And
unserialization is clearly missing some checks in this area.