From 6f852814fd5ba6dab0e56e6d73666d438e6d0c09 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 20 Dec 2023 11:58:33 +0100 Subject: move App::$install check to Config::Load() as suggested by Harald --- Zotlabs/Lib/Config.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Config.php b/Zotlabs/Lib/Config.php index b1754df09..5e735be34 100644 --- a/Zotlabs/Lib/Config.php +++ b/Zotlabs/Lib/Config.php @@ -36,7 +36,7 @@ class Config { if (! array_key_exists('config_loaded', App::$config[$family])) { $r = q("SELECT * FROM config WHERE cat = '%s'", dbesc($family)); - if ($r === false) { + if ($r === false && !App::$install) { sleep(3); $recursionCounter ++; if ($recursionCounter > 10) { @@ -44,7 +44,7 @@ class Config { } self::Load($family, $recursionCounter); } - else { + elseif (is_array($r)) { foreach ($r as $rr) { $k = $rr['k']; App::$config[$family][$k] = $rr['v']; @@ -122,11 +122,6 @@ class Config { */ public static function Get($family, $key, $default = false) { - if (App::$install) { - // The DB is not initalized yet - return false; - } - if ((! array_key_exists($family, App::$config)) || (! array_key_exists('config_loaded', App::$config[$family]))) { self::Load($family); } -- cgit v1.2.3