From 119a4226d812918733a815a896cfed8380188c15 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 12 Feb 2021 21:21:23 +0300 Subject: [PATCH] validate_csrf: remove warning --- include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 6362adbbe..eaf7d8243 100644 --- a/include/functions.php +++ b/include/functions.php @@ -310,7 +310,7 @@ } function validate_csrf($csrf_token) { - return isset($csrf_token) && hash_equals($_SESSION['csrf_token'], $csrf_token); + return isset($csrf_token) && hash_equals($_SESSION['csrf_token'] ?? "", $csrf_token); } function truncate_string($str, $max_len, $suffix = '…') {