X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/077d629ba58c7d23b90246d8c2773c282c23f59a..d3ed59c2753c2babd5aa9a1c5e0109c644904ba8:/widget/contact.php diff --git a/widget/contact.php b/widget/contact.php index 6e04005..a4fccda 100644 --- a/widget/contact.php +++ b/widget/contact.php @@ -2,7 +2,7 @@ $error = NULL; if ($_POST) { global $User; - if ($User) { + if ($User->login) { $_REQUEST['login'] = $User->login; $_REQUEST['email'] = $_REQUEST['email'] ?: $User->email; } @@ -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]; }