Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called

From: Date: Thu, 22 Jun 2000 21:55:29 +0000
Subject: Re: PHP 4.0 Bug #5152: Object passed in a session generateserrors when member functions are called
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-22001@lists.php.net to get a copy of this message
On Fri, 23 Jun 2000, Stanislav Malyshev wrote: > That's all nice and dandy, but what for? Just hide that object from teh > user, and you never worry for the methods - they aren't. Sacha says it > would require some modification to serializer - but certainly much less > that inventing catch-all functions and hacking together special handler > classes. And certainly this would be much cleaner and faster than any pf > these solution (which would inevitably drive users into misunderstanding > of how thsi object really works and what he can do and what he > can't). Just do not show that object - it is of no use anyway, since you > want to bailout on every touch to it! No, it'd be pretty easy. All PHP will do is register another class similar to stdClass. This new class, let's call it, stsSessionClass will implement function overloading so that any attempt to call its methods will result in an error message. Then all we have to do to change deserializers is to substitute 'stdSessionClass' instead of 'stdClass'. -Andrei Linux is like living in a teepee. No Windows, no Gates, Apache in house. - Usenet signature

« previous php.dev (#22001) next »