Re: Fixing bug #71038 session_start() returns TRUE on failure

From: Date: Fri, 15 Jan 2016 07:58:37 +0000
Subject: Re: Fixing bug #71038 session_start() returns TRUE on failure
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-90655@lists.php.net to get a copy of this message
Hi Stas, On Fri, Jan 15, 2016 at 4:05 PM, Stanislav Malyshev <smalyshev@gmail.com> wrote: >> I made PR >> https://github.com/php/php-src/pull/1721 >> >> for bug #71038 >> https://bugs.php.net/bug.php?id=71038 >> >> Currently, the patch is written as it should and >> breaks compatibility on PHP 5.6. >> >> To be compatible with PHP 5.6 (PHP 7.0 is OK), >> it may ignore read failures returned from save handlers. > > I think it should return false on 5.6 too. The docs say: > > This function returns TRUE if a session was successfully started, > otherwise FALSE. > > Thus, if the session was *not* successfully started, it should return > false. In most cases other than read failure, PHP 5.6 is made return FALSE for failures also. Read failure is special because old save handler allowed returning false for read and continued as if there is no errors. I cannot fix this without braking buggy save handlers compatibility. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#90655) next »