validate_csrf: remove warning
This commit is contained in:
parent
f2d3cba231
commit
119a4226d8
|
@ -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 = '…') {
|
||||
|
|
Loading…
Reference in New Issue