summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-05-28 21:27:33 +0300
committerAndrew Dolgov <[email protected]>2023-05-28 21:27:33 +0300
commita28d9582e8f36caa40ac2fea05d0af21b071f75b (patch)
treef291c208cc18d3bcd3c79437441004a3d441b3ed
parent718af52a1b1c3a1d890e7faee0d97af8617c337b (diff)
public/getUnread: fix PHP8 warning if fresh optional parameter is not given
-rwxr-xr-xclasses/handler/public.php2
1 files changed, 1 insertions, 1 deletions
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);