[php-src] PR #25301: Fix GH-25299: Exception string code is lost after unserialize()
| From: | lazerg | Date: | Sun, 08 Nov 2026 04:16:47 +0000 |
| Subject: | [php-src] PR #25301: Fix GH-25299: Exception string code is lost after unserialize() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40419@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25301
Author: lazerg
Exception::__wakeup() unsets $code when it is not an int, so a
PDOException with a SQLSTATE code like "HY000" comes back from
unserialize() with no code at all, and getCode() warns and returns null.
PDOException sets string codes itself, and $code is untyped, so the check
now keeps strings too. Other types are still dropped as before.
Fixes #25299