Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

#24670 [NoF]: defining __call requires __sleep for serialize/session
ID:               24670
Updated by:       lsmith@php.net
Reported By:      tater at potatoe dot com
Status:           No Feedback
Bug Type:         Documentation problem
Operating System: OS X 10.2
PHP Version:      Irrelevant
-Assigned To:
+Assigned To:      dmitry
New Comment:

this seems to be a dupe of #30791


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

[2005-04-22 01:00:03] phpdoc at lists dot php dot net

No feedback was provided for this bug for over a w, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2005-04-14 10:23:31] vrana@php.net

It seems that classes with __call or __sleep (!) methods simply can't
be serialized (serialize() returns "N;" for them). If you can reproduce
it, please change the Category of this bug to Zend Engine 2 problem.

And fill in your PHP Version, please.

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

[2005-04-01 13:52:48] maka3d at yahoo dot com dot br

Does there is a workaround to this?
I did some tests but didn't work?
I thought it would be fixed until 5.0.4

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

[2004-05-17 23:28:58] magicking89 at hotmail dot com

I have the same problem with PHP5 RC2 on Mac Os X 10.2 It's a real
problem because I must to close socket with __sleep but it doesn't work
correctly...

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

[2003-07-16 01:07:06] tater at potatoe dot com

Description:
------------
If you create a __call() method for a class, and then try to serialize
it yourself, or store an object of that class in $_SESSION, you need to
either explicitly define a __sleep() method as well, or make sure that
__call() will respond appropriately. Otherwise serialize() will
complain. It seems unlikely that this is a bug, though I suppose it
might be a feature request. So it should just be spelled out in the
documentation for __call() when that gets written.

Reproduce code:
---------------
class foo { function __call() { return; } }
$a = new foo;
serialize($a);

Expected result:
----------------
n/a

Actual result:
--------------
n/a


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


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

Report this thread to moderator Post Follow-up to this message
Old Post
lsmith@php.net
05-30-05 01:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:34 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.