|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59045 DateTime not fetched/deserialized correctly
Submitted: 2010-01-25 16:27 UTC Modified: 2010-01-25 16:37 UTC
From: eda-qa at disemia dot com Assigned:
Status: Not a bug Package: APC (PECL)
PHP Version: 5.2.4 OS:
Private report: No CVE-ID: None
 [2010-01-25 16:27 UTC] eda-qa at disemia dot com
DateTime objects are not properly retrieved from the cache. Attempting to work with the object results in a failure.

I'm accessing the sample code via a web page.

Reproduce code:

$d = new DateTime();
print( $d->format(DateTime::W3C) . "\n" );
apc_store( 'q1', $d );
print( apc_fetch( 'q1' )->format( DateTime::W3C ) . "\n" );


Expected result:
The same datetime should be printed twice.

Actual result:
( ! ) Warning: DateTime::format() [function.DateTime-format]: The DateTime object has not been correctly initialized by its constructor in /home/projects/Current/vmed/web/test/datetime.php on line 7


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-25 16:30 UTC]
You can't cache internal objects.
 [2010-01-25 16:37 UTC] eda-qa at disemia dot com
For those interested:
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 05:01:29 2024 UTC