From fc412baac7378a01d9c5ab90405365b56d3abe4b Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 17 Aug 2012 22:37:16 +0200 Subject: [PATCH] do not generate double headers --- www/avatar.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/avatar.php b/www/avatar.php index 09bf197..e707dc4 100644 --- a/www/avatar.php +++ b/www/avatar.php @@ -19,8 +19,8 @@ if (!file_exists($cfgFile)) { 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); } @@ -35,11 +35,11 @@ require $cfgFile; * * @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); } -- 2.30.2