validate_csrf: remove warning

master
Andrew Dolgov 4 years ago
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…
Cancel
Save