From a28d9582e8f36caa40ac2fea05d0af21b071f75b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 28 May 2023 21:27:33 +0300 Subject: [PATCH] public/getUnread: fix PHP8 warning if fresh optional parameter is not given --- classes/handler/public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/handler/public.php b/classes/handler/public.php index d7a7010fe..50aa7b1a3 100755 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -260,7 +260,7 @@ class Handler_Public extends Handler { function getUnread(): void { $login = clean($_REQUEST["login"]); - $fresh = clean($_REQUEST["fresh"]) == "1"; + $fresh = clean($_REQUEST["fresh"] ?? "0") == "1"; $uid = UserHelper::find_user_by_login($login);