summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-12 21:21:23 +0300
committerAndrew Dolgov <[email protected]>2021-02-12 21:21:23 +0300
commit119a4226d812918733a815a896cfed8380188c15 (patch)
treec35018db84e3a8ceaac7ff51a84b2c246ec08adb /include
parentf2d3cba2316a39e3d27e2e93e52562e72e7bd99d (diff)
validate_csrf: remove warning
Diffstat (limited to 'include')
-rw-r--r--include/functions.php2
1 files changed, 1 insertions, 1 deletions
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 = '&hellip;') {