php.net |  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
Votes:1
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 - 2 = ?
Subscribe to this entry?

 
 [2010-10-24 20:50 UTC] j dot lutz at lutz-it dot com
Description:
------------
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 ;-)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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