Fix remaining dhcp undefined array key warnings

This commit is contained in:
billz
2024-12-17 11:32:50 -08:00
parent 26c64d42e6
commit 3898b82287
2 changed files with 3 additions and 3 deletions

View File

@@ -338,9 +338,9 @@ function CSRFValidate()
{
if(isset($_POST['csrf_token'])) {
$post_token = $_POST['csrf_token'];
$header_token = $_SERVER['HTTP_X_CSRF_TOKEN'];
$header_token = $_SERVER['HTTP_X_CSRF_TOKEN'] ?? null;
if (empty($post_token) && empty($header_token)) {
if (empty($post_token) && is_null($header_token)) {
return false;
}
$request_token = $post_token;