diff --git a/src/Core/Config/AbstractDbaConfigAdapter.php b/src/Core/Config/AbstractDbaConfigAdapter.php index f7fd701b00..c2e8bda5d5 100644 --- a/src/Core/Config/AbstractDbaConfigAdapter.php +++ b/src/Core/Config/AbstractDbaConfigAdapter.php @@ -6,8 +6,11 @@ use Friendica\Database\DBA; abstract class AbstractDbaConfigAdapter { + /** @var bool */ + protected $connected = true; + public function isConnected() { - return DBA::connected(); + return $this->connected; } } diff --git a/src/Core/Config/JITConfigAdapter.php b/src/Core/Config/JITConfigAdapter.php index 76476be3aa..ecd88bb3d3 100644 --- a/src/Core/Config/JITConfigAdapter.php +++ b/src/Core/Config/JITConfigAdapter.php @@ -26,6 +26,7 @@ class JITConfigAdapter extends AbstractDbaConfigAdapter implements IConfigAdapte public function __construct(IConfigCache $configCache) { $this->configCache = $configCache; + $this->connected = DBA::connected(); } /** diff --git a/src/Core/Config/PreloadConfigAdapter.php b/src/Core/Config/PreloadConfigAdapter.php index 2fe3d4cdad..96331e7a2c 100644 --- a/src/Core/Config/PreloadConfigAdapter.php +++ b/src/Core/Config/PreloadConfigAdapter.php @@ -27,6 +27,7 @@ class PreloadConfigAdapter extends AbstractDbaConfigAdapter implements IConfigAd public function __construct(IConfigCache $configCache) { $this->configCache = $configCache; + $this->connected = DBA::connected(); $this->load(); }