public/getUnread: fix PHP8 warning if fresh optional parameter is not given

This commit is contained in:
Andrew Dolgov 2023-05-28 21:27:33 +03:00
parent 718af52a1b
commit a28d9582e8
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
1 changed files with 1 additions and 1 deletions

View File

@ -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);