Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called
| From: | Sascha Schumann | Date: | Thu, 22 Jun 2000 20:55:09 +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-21981@lists.php.net to get a copy of this message | ||
On Thu, 22 Jun 2000, Rasmus Lerdorf wrote:
> > Simple add a facility to Zend which allows registering a
> > general function which is always called, when a user tries to
> > execute a method of an object. This function could output a
> > text like this:
> >
> > "The object foo was instantiated without having the class
> > definition bar available. To use the methods of an object,
> > you have to include the class definition."
>
> Is there anything stopping us from optionally including the class
> definition in the serialization? Wouldn't that make all this go away?
Yay, another suggestion. :)
We still have the valid case that a site has multiple areas,
which use the same session, but which don't share code. So
why should we serialize the class definition?
What do you think of this:
If the class definition is not available on object
deserialization, we store the original class name in a hash
table and assign the object a special class. This class would
always halt the execution of the script, if any of its
methods would be called (and output an appropiate text). This
addresses the two most important points. We need some support
for the catch-all function in Zend though. Zeev, Andi?
- Sascha