Edit report at https://bugs.php.net/bug.php?id=62852&edit=1
ID: 62852
Comment by: bugs dot php dot net at dw-perspective dot org dot
uk
Reported by: kasper at webmasteren dot eu
Summary: Unserialize Invalid Date causes crash
Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: windows, linux
PHP Version: Irrelevant
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
I still get this in PHP 5.6.12. The fatal error can't be caught or suppressed in any way:
*** Code ***
$x = 'O:8:"DateTime":0:{}';
function exception_error_handler($errno, $errstr, $errfile, $errline ) { echo "how
interesting!\n"; }
set_error_handler("exception_error_handler");
try {
$y = unserialize($x);
} catch (Exception $e) {
var_dump($e);
}
*** Result ***
Fatal error: Invalid serialization data for DateTime object in - on line 12
Call Stack:
16.9971 235224 1. {main}() -:0
16.9971 235456 2. unserialize() -:12
16.9971 243928 3. DateTime->__wakeup() -:12
Previous Comments:
------------------------------------------------------------------------
[2014-10-07 23:33:58] stas@php.net
Automatic comment on behalf of reeze.xia@gmail.com
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=46a3f257724df7b85cc8c3e6374c36ed9ee783b4
Log: Fixed bug #62852 (Unserialize invalid DateTime causes crash)
------------------------------------------------------------------------
[2014-10-07 23:33:30] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=e766f85405cd936a07a30a045f419199b6c02ed7
Log: Revert "Fixed bug #62852 (Unserialize invalid DateTime causes crash)"
------------------------------------------------------------------------
[2014-10-07 23:23:02] stas@php.net
Automatic comment on behalf of reeze.xia@gmail.com
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=46a3f257724df7b85cc8c3e6374c36ed9ee783b4
Log: Fixed bug #62852 (Unserialize invalid DateTime causes crash)
------------------------------------------------------------------------
[2014-10-07 23:22:33] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=e766f85405cd936a07a30a045f419199b6c02ed7
Log: Revert "Fixed bug #62852 (Unserialize invalid DateTime causes crash)"
------------------------------------------------------------------------
[2014-06-10 14:43:50] julio at listascuba dot com
I think the problem persist in PHP 5.5.6
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=62852
--
Edit this bug report at https://bugs.php.net/bug.php?id=62852&edit=1