From dc7b531b3d4c33d18f64396ca20b0e010579cc88 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 20 Nov 2020 02:16:47 +0100 Subject: [PATCH] contact: silence warning checking missing client headers Same behaviour but avoiding definedness error in logs. --- widget/contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/contact.php b/widget/contact.php index b7e073f..a4fccda 100644 --- a/widget/contact.php +++ b/widget/contact.php @@ -58,7 +58,7 @@ switch ($source) { 'X-Accept-Language' => 'HTTP_ACCEPT_LANGUAGE', 'User-Agent' => 'HTTP_USER_AGENT', ) as $mailhdr => $serverhdr) { - if (!$_SERVER[$serverhdr]) continue; + if (empty($_SERVER[$serverhdr])) continue; $header .= "\r\n$mailhdr: ".$_SERVER[$serverhdr]; } -- 2.30.0