aboutsummaryrefslogtreecommitdiffstats
path: root/include/system_unavailable.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2024-01-01 21:01:47 +0100
committerMario Vavti <mario@mariovavti.com>2024-01-01 21:01:47 +0100
commitf2f9cfaf28508f66c1e948e7d1a9bf6b0c637d9d (patch)
tree0b749e97d4d51307f698978eb364da8ab8675b04 /include/system_unavailable.php
parent62db8c3969f783897ff2de1bf3250057c37eb422 (diff)
downloadvolse-hubzilla-f2f9cfaf28508f66c1e948e7d1a9bf6b0c637d9d.tar.gz
volse-hubzilla-f2f9cfaf28508f66c1e948e7d1a9bf6b0c637d9d.tar.bz2
volse-hubzilla-f2f9cfaf28508f66c1e948e7d1a9bf6b0c637d9d.zip
Work around possible loop and use Lib/Config in init
Diffstat (limited to 'include/system_unavailable.php')
-rw-r--r--include/system_unavailable.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/system_unavailable.php b/include/system_unavailable.php
index 4e0e6717b..e927bc633 100644
--- a/include/system_unavailable.php
+++ b/include/system_unavailable.php
@@ -3,7 +3,10 @@
require_once("include/network.php");
function system_down() {
-http_status(503, 'Service Unavailable');
+// Set $skiplog to true here. Otherwise we will run into a loop
+// when system_unavailable() -> system_down() is called from Zotlabs\Lib\Config::Load()
+// but the DB is not available.
+http_status(503, 'Service Unavailable', true);
echo <<< EOT
<html>
<head><title>System Unavailable</title></head>
@@ -12,4 +15,4 @@ Apologies but this site is unavailable at the moment. Please try again later.
</body>
</html>
EOT;
-} \ No newline at end of file
+}