On Wednesday, July 11, 2012 7:01:07 AM UTC+7, Wendall wrote:
>
> Hi all,
>
> I've set a session variable that I assign to an object.  When I load other 
> pages, sometimes I can get data out of the session var, sometimes I can't.  
> For example, I check a property of the object in the session var to 
> dynamically assign a stylesheet to the page.  In some controller views, 
> this stylesheet is being attached, while in some other views it is not.  
> I'm not altering, deleting, or destroying my session var between these 
> views, so am unsure as to why this is happening.  When I run a debug on 
> this session var on the pages that it's not  working properly on, I'm 
> seeing the object being described as an instance of 
> "__PHP_Incomplete_Class".  In the debug, I can see all the properties of 
> the object, but when I try to do something simple like get the object's id, 
> the id comes back as "null" and I get the following Notice:
>
> The script tried to execute a method or access a property of an incomplete 
> object. Please ensure that the class definition "Team" of the object you 
> are trying to operate on was loaded _before_ unserialize() gets called or 
> provide a __autoload() function to load the class definition.
>
> Any thoughts on what's going on?  Am I trying to stuff too much data into 
> a session var?  Thanks for any help.
>

Don't store objects in sessions? 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to