Edit report at https://bugs.php.net/bug.php?id=60640&edit=1

 ID:                 60640
 Updated by:         ar...@php.net
 Reported by:        drak at zikula dot org
 Summary:            Invalid return values
-Status:             Assigned
+Status:             To be documented
 Type:               Bug
 Package:            Session related
 PHP Version:        5.4.0RC4
 Assigned To:        arpad
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2012-01-04 01:31:04] ar...@php.net

Automatic comment from SVN on behalf of arpad
Revision: http://svn.php.net/viewvc/?view=revision&revision=321741
Log: fix return values of inherited session handler to match user handlers - 
#60640

------------------------------------------------------------------------
[2012-01-03 10:01:57] drak at zikula dot org

Description:
------------
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()

Expected result:
----------------
I would expect the methods of SessionHandler class to return back true or false 
for all methods except read() which should return a string, as expected by the 
session_set_save_handler()



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60640&edit=1

Reply via email to