git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f67c60
)
contact: silence warning checking missing client headers
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 20 Nov 2020 01:16:47 +0000
(
02:16
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 5 Dec 2020 00:38:53 +0000
(
01:38
+0100)
Same behaviour but avoiding definedness error in logs.
widget/contact.php
patch
|
blob
|
history
diff --git
a/widget/contact.php
b/widget/contact.php
index b7e073fe40f72890260fcab2f448fd6ca1f3123a..a4fccda1a0ca8aead4f0b5f106653696cf05e043 100644
(file)
--- 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];
}