Re: Removing base class from session handler
| From: | Yasuo Ohgaki | Date: | Sat, 24 Jan 2015 17:05:18 +0000 |
| Subject: | Re: Removing base class from session handler | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81082@lists.php.net to get a copy of this message | ||
Hi Andrey,
On Sat, Jan 24, 2015 at 6:34 PM, Andrey Andreev <narf@devilix.net> wrote:
> > Let's keep SessionHandler class. However,
> > PHP_FUNCTION(session_set_save_handler)
> > should be cleaned up to verify implemented/extended interface/class. It's
> > BC.
> > Do you have opinion for this?
>
> php > session_set_save_handler(new stdclass);
> PHP Warning: session_set_save_handler() expects parameter 1 to be
> SessionHandlerInterface, object given in php shell code on line 1
As I pasted code in this thread, current code does not check if supplied
object
has valid class/interface, but it checks methods implemented. SdtClass does
not
have them obviously, therefore it raises error.
It's a legacy code when PHP didn't have proper OOP support. This is the code
that I'm willing to remove/change.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net