Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called
| From: | Shane Caraveo | Date: | Thu, 22 Jun 2000 23:47:40 +0000 |
| Subject: | Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22024@lists.php.net to get a copy of this message | ||
Sascha Schumann wrote:
>
> > When the class/object is deserialized, if it is not already defined,
> > throw an error at that time. Right now, it just changes it to stdclass
> > and goes on.
>
> That is contradictionary to your last email where you
> proposed a solution which allowed users to leave classes
> undefined.
??? I don't remember that. I've stuck with wanting a real error to
occure if the class is not defined when the objects are deserialized. I
think the thread is getting mixed up. Anyway, I still like the below
best out of everything I have read in this thread. It's simple, sweet,
and deals with the issue, and allows the scriptor to decide the
behaviour.
>
> > Here is another idea, that would fit in with either of the other
> > proposals. A new function session_options(flag). This can take flags
> > that set various options. There would be a default behavoir defined via
> > ini file, as defined by one of the previous proposals, if the function
> > is not called. You could set options such as: WARN_UNDEFINED,
> > HALT_UNDEFINED, IGNORE_UNDEFINED. WARN_UNDEFINED will simply do a
> > E_NOTICE message, HALT_UNDEFINED would print E_ERROR message,
> > IGNORE_UNDEFINED will pass the undefined objects through. This way, for
> > development you can set the initial behavoir to HALT_UNDEFINED, and in
> > your script, when you know you dont need an objet, call
> > session_options(IGNORE_UNDEFINED). We now get the best of both worlds,
> > error messages when needed without changing the current session
> > functions.
>
> We might do that.
>
> - Sascha