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;

View File

@ -7,7 +7,7 @@
<div class="input-group">
<input type="hidden" name="no-resolv" value="0">
<div class="form-check form-switch">
<input class="form-check-input" id="no-resolv" type="checkbox" name="no-resolv" value="1" <?php echo $conf['no-resolv'] ? ' checked="checked"' : "" ?> aria-describedby="no-resolv-description">
<input class="form-check-input" id="no-resolv" type="checkbox" name="no-resolv" value="1" <?php echo ($conf['no-resolv'] ?? false) ? ' checked="checked"' : '' ?> aria-describedby="no-resolv-description">
<label class="form-check-label" for="no-resolv"><?php echo _("Only ever query DNS servers configured below") ?></label>
</div>
<p id="no-resolv-description">