|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-01-11 09:24 UTC] andrei at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 10:00:01 2025 UTC |
I have three .php-files, called in this order : 1) start session, set some general session-variables 2) generate object, store in session 3) call member-function, show results Scripts 2 and 3 use a 'require' statement to include the class-definition, script 1 doesn't. The above order of calling scripts work fine. Session-file shows this : tst|O:3:"app":6:{s:5:"start";s:9:"952606800";s:3:"end";i:952608600;s:4:"desc";s:2:"aa";s:8:"id_users";a:0:{}s:6:"errors";a:0:{}s:4:"time";i:0;} Seems fine to me. Now, when I return and follow the three steps _again_, I get an error that the member-function does not exist anymore. The session file now shows : tst|O:7:"stdClass":6:{s:5:"start";s:9:"952606800";s:3:"end";i:952608600;s:4:"desc";s:2:"aa";s:8:"id_users";a:0:{}s:6:"errors";a:0:{}s:4:"time";i:0;} Behold ! The classname has been changed ! No wonder I can't access its member-function. I traced the problem to the fact that in step 1) the class definition is _not_ included (when I do, the problem disappears). However, the object in question is not used or referenced in step 1) (the session is, of course). Is this a bug or a feature ? Do I have to include the class-definition every time I use the session ?