registering object in session - Object to string notice error?

From: Date: Fri, 08 Nov 2002 16:24:06 +0000
Subject: registering object in session - Object to string notice error?
Groups: php.general 
Request: Send a blank email to php-general+get-123409@lists.php.net to get a copy of this message
I have a simple object/class: Class MainData { Var items =array(); ...some other functions but nothing to initialize it } in a code when I do : $somevar= new MainData(); session_register($somevar); I get "notice" type of error: Notice: Object to string conversion in C...\page_vip.php on line 27 How can I avoid this? It does not stop code and it is not a fatal error but perhaps I am missing something Paul

« previous php.general (#123409) next »