diff --git a/classes/api.php b/classes/api.php index b482a70eb..255de52d4 100755 --- a/classes/api.php +++ b/classes/api.php @@ -99,7 +99,7 @@ class API extends Handler { } function isLoggedIn(): bool { - return $this->_wrap(self::STATUS_OK, array("status" => $_SESSION["uid"] != '')); + return $this->_wrap(self::STATUS_OK, array("status" => (bool)($_SESSION["uid"] ?? ''))); } function getUnread(): bool {