SessionHandler class return values
| From: | Drak | Date: | Tue, 03 Jan 2012 05:59:47 +0000 |
| Subject: | SessionHandler class return values | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-57169@lists.php.net to get a copy of this message | ||
I think something is wrong with the SessionHandler class and I dont know if
it requires a bug report.
According to the documentation at
http://www.php.net/manual/en/class.sessionhandler.php
the various methods
return 0 for success and 1 for failure which is kind of backwards since 0
would normally be evaluated as false and 1 as true. This is in direct
contradiction with the current expected behaviour of
session_set_save_handler()
http://www.php.net/manual/en/function.session-set-save-handler.php
which
expects true or false return values except for the read handler which
should always return a string. What's the deal here?
I think the return values really should be true and false for this class,
as expected by session_set_save_handler()
Regards,
Drak