diff options
| author | 2020-12-12 15:59:37 +0100 | |
|---|---|---|
| committer | 2020-12-12 15:59:37 +0100 | |
| commit | 98b82842d58579832f0687127218cd272a7ad636 (patch) | |
| tree | 7b865da415111d8eaa354ba4d280a97c2d7b0fdd /lib/Minz/Session.php | |
| parent | da4121cb6cd7700212a935fbb38e9f2a567d3609 (diff) | |
Session compatibility PHP 7.1 and older (#3273)
#fix https://github.com/FreshRSS/FreshRSS/issues/3239
Reason: https://php.net/session-write-close used to return void and not
boolean before PHP 7.2
Diffstat (limited to 'lib/Minz/Session.php')
| -rw-r--r-- | lib/Minz/Session.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Minz/Session.php b/lib/Minz/Session.php index cb0e5336e..f8ecd2f31 100644 --- a/lib/Minz/Session.php +++ b/lib/Minz/Session.php @@ -12,14 +12,16 @@ class Minz_Session { private static $locked = false; public static function lock() { - if (!self::$volatile && !self::$locked && session_start()) { + if (!self::$volatile && !self::$locked) { + session_start(); self::$locked = true; } return self::$locked; } public static function unlock() { - if (!self::$volatile && session_write_close()) { + if (!self::$volatile) { + session_write_close(); self::$locked = false; } return self::$locked; |
