note 116288 added to class.sessionhandlerinterface

From: Date: Sat, 06 Dec 2014 03:54:50 +0000
Subject: note 116288 added to class.sessionhandlerinterface
Groups: php.notes 
Request: Send a blank email to php-notes+get-201078@lists.php.net to get a copy of this message
Note that session_start( ) calls open then read and the class returns true for open and the value of session or empty for read. Well, then there is no catch for errors, this is, session_start() must return false on failure, but that is not the case for the class implementation on method open, no matter if you return true or false or whatever from open, it is ignored by session_start() function and proceeds to read method A bug?, if open returns false, session_start() should stop the next step (read) and return itself false if(session_start()) ...code else exit( ); So forget about session_start() return value, you need to implement an error catch routine and exit() in case of failure on open method ---- Server IP: 72.52.91.14 Probable Submitter: 189.197.160.230 ---- Manual Page -- http://php.net/manual/en/class.sessionhandlerinterface.php Edit -- https://master.php.net/note/edit/116288 Del: integrated -- https://master.php.net/note/delete/116288/integrated Del: useless -- https://master.php.net/note/delete/116288/useless Del: bad code -- https://master.php.net/note/delete/116288/bad+code Del: spam -- https://master.php.net/note/delete/116288/spam Del: non-english -- https://master.php.net/note/delete/116288/non-english Del: in docs -- https://master.php.net/note/delete/116288/in+docs Del: other reasons-- https://master.php.net/note/delete/116288 Reject -- https://master.php.net/note/reject/116288 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201078) next »