|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6348 serializing objects which use __sleep() can cripple the serialized return
Submitted: 2000-08-25 06:12 UTC Modified: 2000-12-11 07:59 UTC
From: bachi at insign dot ch Assigned:
Status: Closed Package: Class/Object related
PHP Version: 4.0.1pl2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: bachi at insign dot ch
New email:
PHP Version: OS:


 [2000-08-25 06:12 UTC] bachi at insign dot ch
If you serialize an object that uses __sleep() to define which properties should be serialized, the serialized code will be crippled if a class property is defined (and returned by __sleep() to be serialized), but not yet used in the object.

The serialized code includes then the property name, but with no value, so that the structure is crippled and it is not possible to unserialize() it.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-11 06:15 UTC]
Does it still happen in latest version? If so, please
provide short reproducing script for this behaviour.
 [2000-12-11 07:59 UTC]
fixed in CVS & upcoming 4.0.4
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 05 05:01:29 2024 UTC