diff --git a/app/class/Servicesession.php b/app/class/Servicesession.php index e969ca36..2b3414d4 100644 --- a/app/class/Servicesession.php +++ b/app/class/Servicesession.php @@ -11,7 +11,7 @@ public function setvisitor(bool $visitor): void public function getvisitor(): bool { - return $_SESSION['visitor']; + return $_SESSION['visitor'] ?? true; } public function setuser(string $userid): void @@ -21,7 +21,7 @@ public function setuser(string $userid): void public function getuser(): ?string { - return $_SESSION['user']; + return $_SESSION['user'] ?? null; } public function setwsessionid(string $wsessionid): void