ID:               35281
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mike at naberezny dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Class/Object related
 Operating System: Windows XP
 PHP Version:      5.0.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2005-11-18 19:08:13] mike at naberezny dot com

Description:
------------
The session extension does not respect the visibility of the __sleep()
method.  If __sleep() is protected or private, calling serialize() will
raise a fatal error.  However, the session extension will still
serialize it.

Reproduce code:
---------------
<?php
class Foo { protected function __sleep() {} }

$_SESSION['foo'] = new Foo();
var_dump($_SESSION['foo']);
?>

Expected result:
----------------
"Fatal error:  Call to protected method Foo::__sleep() from context..."
at the time of assignment.

Actual result:
--------------
object(Foo)#1 (0) {
}


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35281&edit=1

Reply via email to