diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-09-03 15:41:30 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-09-03 15:41:30 +0200 |
commit | 38a164aa7a6a5e52971cbc39273a327a22ecc994 (patch) | |
tree | b0db0f24aae85d2a88103252e5515fe0537208eb /lib/private/appconfig.php | |
parent | 21ba3b8737dc61dcee974e0179c11cad7ee1ae6a (diff) | |
download | nextcloud-server-38a164aa7a6a5e52971cbc39273a327a22ecc994.tar.gz nextcloud-server-38a164aa7a6a5e52971cbc39273a327a22ecc994.zip |
Make sure the array exists
Diffstat (limited to 'lib/private/appconfig.php')
-rw-r--r-- | lib/private/appconfig.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php index b9b5dacb168..7ee64980fd0 100644 --- a/lib/private/appconfig.php +++ b/lib/private/appconfig.php @@ -161,6 +161,10 @@ class AppConfig implements IAppConfig { ]); if ($inserted) { + if (!isset($this->cache[$app])) { + $this->cache[$app] = []; + } + $this->cache[$app][$key] = $value; return true; } @@ -264,6 +268,10 @@ class AppConfig implements IAppConfig { $result = $sql->execute(); while ($row = $result->fetch()) { + if (!isset($this->cache[$row['appid']])) { + $this->cache[$row['appid']] = []; + } + $this->cache[$row['appid']][$row['configkey']] = $row['configvalue']; } $result->closeCursor(); |