diff options
author | Simon Rettberg | 2023-11-15 17:53:47 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-11-15 17:53:47 +0100 |
commit | aa49154e5a9ee135c3f0286ddda8a01a5290b1ed (patch) | |
tree | 0397403f11a8a890ee11458ea0b1887796480115 /inc/session.inc.php | |
parent | idea: Always inspect as if strict_types is enabled (diff) | |
download | slx-admin-aa49154e5a9ee135c3f0286ddda8a01a5290b1ed.tar.gz slx-admin-aa49154e5a9ee135c3f0286ddda8a01a5290b1ed.tar.xz slx-admin-aa49154e5a9ee135c3f0286ddda8a01a5290b1ed.zip |
Fix more type errors, stricter typing
Diffstat (limited to 'inc/session.inc.php')
-rw-r--r-- | inc/session.inc.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/session.inc.php b/inc/session.inc.php index 622eb320..ccb878cd 100644 --- a/inc/session.inc.php +++ b/inc/session.inc.php @@ -1,5 +1,7 @@ <?php +declare(strict_types=1); + require_once('config.php'); class Session @@ -141,7 +143,7 @@ class Session } // Refresh cookie if appropriate self::setupSessionAccounting(Request::isGet() && $row['dateline'] + 86400 < $now + CONFIG_SESSION_TIMEOUT); - self::$userId = $row['userid']; + self::$userId = (int)$row['userid']; self::$data = @json_decode($row['data'], true); if (!is_array(self::$data)) { self::$data = []; |