do not generate double headers
[surrogator.git] / www / avatar.php
index bf2b9bca702347d91b0216717ea9b171207c9bd4..e707dc40f7955b5cfb8912ae8b896896cca49056 100644 (file)
@@ -10,7 +10,7 @@
  * @package  Surrogator
  * @author   Christian Weiske <cweiske@cweiske.de>
  * @license  http://www.gnu.org/licenses/agpl.html AGPLv3 or later
- * @link     http://git.cweiske.de/?p=surrogator.git
+ * @link     https://sourceforge.net/p/surrogator/
  */
 namespace surrogator;
 $cfgFile = __DIR__ . '/../data/surrogator.config.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);
 }