php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46891 Make DateTime (and any other internal class) serializable
Submitted: 2008-12-17 21:19 UTC Modified: 2008-12-17 21:29 UTC
From: markus at malkusch dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 5.2.8 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: markus at malkusch dot de
New email:
PHP Version: OS:

 

 [2008-12-17 21:19 UTC] markus at malkusch dot de
Description:
------------
DateTime is not serializable and therefore can't be stored in 
sessions.

Could you please make Datetime (and as much other internal classes 
as possible) serializable?

Thank you very much.

Reproduce code:
---------------
@see Bug 42239

Expected result:
----------------
At least PHP should tell a more verbose error message. The 
warning "The DateTime object has not been correctly initialized by 
its constructor" gives a very small hint to the serialization 
problem.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-17 21:29 UTC] derick@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

This has already been implemented for PHP 5.3.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC