|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-13 00:02 UTC] tony2001@php.net
[2005-01-13 02:10 UTC] alan at akbkhome dot com
[2005-01-13 02:13 UTC] alan_k@php.net
[2005-03-07 21:55 UTC] sniper@php.net
[2005-03-15 01:00 UTC] php-bugs at lists dot php dot net
[2005-04-14 09:42 UTC] alan_k@php.net
[2005-04-14 09:47 UTC] alan_k@php.net
[2005-06-01 13:04 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ If an object is overloaded (with __call()), then serializ'ing the object will fail unless __sleep() is defined. It would be far clearer to either a) - force __sleep to defined on overloaded objects (E_WARN?) b) - dont call __call() with the __sleep() request. Reproduce code: --------------- class a { public $a = 4; function __call($a,$b) { return "unknown method"; } } $b = new a; echo serialize($b); Expected result: ---------------- Warning: __sleep is not defined on an overloaded object with __call() Actual result: -------------- Warning about unexpected return value to __sleep() and an empty string output from serialize()