|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53146 DateInterval Object cannot be serialized
Submitted: 2010-10-24 20:50 UTC Modified: 2011-01-22 08:44 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: j dot lutz at lutz-it dot com Assigned: derick (profile)
Status: Duplicate Package: Date/time related
PHP Version: 5.3.3 OS: Win7
Private report: No CVE-ID: None
 [2010-10-24 20:50 UTC] j dot lutz at lutz-it dot com
Same problem as in #39821 regarding DateTime Object which was not serializabel until v5.3.

After unserialize of a DateInterval-Object it's not possible to use the method format() onto this object. 

ErrorException [ Warning ]: DateInterval::format()
"The DateInterval object has not been correctly initialized by its constructor"

but that would be very handy ;-)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-02 16:17 UTC]
-Assigned To: +Assigned To: cataphract
 [2011-01-09 06:00 UTC]
-Assigned To: cataphract +Assigned To: derick
 [2011-01-09 06:00 UTC]
Reassigning to Derick, as the patch I've written is under his consideration.
 [2011-01-22 08:44 UTC]
-Status: Assigned +Status: Duplicate
 [2011-01-22 08:44 UTC]
same problem as bug #52113
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Feb 26 19:01:24 2021 UTC