php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45416 __wakeup is called reference twice
Submitted: 2008-07-02 12:19 UTC Modified: 2008-07-15 01:59 UTC
From: tinozangerle at aol dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tinozangerle at aol dot com
New email:
PHP Version: OS:

 

 [2008-07-02 12:19 UTC] tinozangerle at aol dot com
Description:
------------
__wakeup is called twice, the same object

Reproduce code:
---------------
http://nopaste.php-quake.net/36927

Expected result:
----------------
2
object(a)#1 (2) 
  { ["foo:private"]=> 
      int(1) 
    ["bar:private"]=> string(5) "hello" 
  } 

object(b)#2 (1) 
{ 
  ["a:private"]=> &object(a)#1 (2) 
   { ["foo:private"]=>int(1) 
     ["bar:private"]=>string(5) "hello" } 
} 
hello

Actual result:
--------------
22
hello
object(a)#1 (2) 
  { ["foo:private"]=> 
      int(1) 
    ["bar:private"]=> string(5) "hello" 
  } 

object(b)#2 (1) 
{ 
  ["a:private"]=> &object(a)#1 (2) 
   { ["foo:private"]=>int(1) 
     ["bar:private"]=>string(5) "hello" } 
} 
hello

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-09 20:22 UTC] tinozangerle at aol dot com
Ok, well I see.
When I serialize the referenced object it save the complete object.
On unserializing the object the referenced object will be wakeup.
Well, I'll add a sleep function with all variables and will delete the refernced object.

Tino
 [2008-07-15 01:59 UTC] jani@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC