validate_csrf: remove warning

This commit is contained in:
Andrew Dolgov 2021-02-12 21:21:23 +03:00
parent f2d3cba231
commit 119a4226d8
1 changed files with 1 additions and 1 deletions

View File

@ -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 = '…') {