|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-17 12:34 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 01:00:01 2025 UTC |
Since i updated to php-4.0.3pl1 from 4.0.1pl2 registering objects doesn't work correctly for me. What i do is the following: - create a object "a" from a class "myclass" - in the constructor myclass() i create a new object "x" $this->x from class "innerclass" - when i register my object "a" and restore it, i get an error when i try to call a method of $this->x in object "a" Here an Example. This works in php-4.0.1pl2 but not in php-4.0.3pl1 (You get an error when pressing reload link) filename: index.php <?php class myclass { function myclass() { $this->x = new innerobject; } function show() { $this->x->go(); } } class innerobject { function go() { print "I'm in go() now!<br>"; } } session_register("a"); if (! is_object($a) ) { $a = new myclass; } $a->show(); ?> <br> <a href="index.php">reload</a> ?>