Skip to content

Commit

Permalink
do not generate double headers
Browse files Browse the repository at this point in the history
  • Loading branch information
cweiske committed Aug 17, 2012
1 parent 1678ee3 commit fc412ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions www/avatar.php
Expand Up @@ -19,8 +19,8 @@
if (!file_exists($cfgFile)) {
err(
500,
"Configuration file does not exist.\n"
. "Copy data/surrogator.config.php.dist to data/surrogator.config.php"
"Configuration file does not exist.",
"Copy data/surrogator.config.php.dist to data/surrogator.config.php"
);
exit(2);
}
Expand All @@ -35,11 +35,11 @@
*
* @return void
*/
function err($statusCode, $msg)
function err($statusCode, $msg, $more = '')
{
header('HTTP/1.0 ' . $statusCode . ' ' . $msg);
header('Content-Type: text/plain');
echo $msg . "\n";
echo $msg . "\n" . $more;
exit(1);
}

Expand Down

0 comments on commit fc412ba

Please sign in to comment.