Skip to content

A free, self-hostable news aggregator…

Session compatibility PHP 7.1 and older (#3273)

Alexandre Alapetite98b82842d585
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;