Bug->Doc #60640 [->Opn]: Invalid return values

From: Date: Sat, 07 Jan 2012 14:22:06 +0000
Subject: Bug->Doc #60640 [->Opn]: Invalid return values
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7737@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60640&edit=1 ID: 60640 Updated by: bjori@php.net Reported by: drak at zikula dot org Summary: Invalid return values -Status: To be documented +Status: Open -Type: Bug +Type: Documentation Problem Package: Session related PHP Version: 5.4.0RC4 Assigned To: arpad Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2012-01-04 01:34:32] arpad@php.net 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. ------------------------------------------------------------------------ [2012-01-04 01:31:04] arpad@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

« previous php.doc.bugs (#7737) next »