aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-04-29 17:15:45 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-04-30 09:38:47 +0200
commiteb25e10f5590d48400af1f7c99f7a363bd9394df (patch)
treed73248deb358ab289529b67998de8a799174a441 /lib/private
parented4603c5aaab91c56ba49728046504f6e49c53d3 (diff)
downloadnextcloud-server-eb25e10f5590d48400af1f7c99f7a363bd9394df.tar.gz
nextcloud-server-eb25e10f5590d48400af1f7c99f7a363bd9394df.zip
fix: Avoid reference use in AppConfig
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/AppConfig.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index 338792e23d1..0732294abae 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -850,11 +850,10 @@ class AppConfig implements IAppConfig {
// update local cache
if ($lazy) {
- $cache = &$this->lazyCache;
+ $this->lazyCache[$app][$key] = $value;
} else {
- $cache = &$this->fastCache;
+ $this->fastCache[$app][$key] = $value;
}
- $cache[$app][$key] = $value;
$this->valueTypes[$app][$key] = $type;
return true;
@@ -1264,11 +1263,10 @@ class AppConfig implements IAppConfig {
foreach ($rows as $row) {
// most of the time, 'lazy' is not in the select because its value is already known
if (($row['lazy'] ?? ($lazy ?? 0) ? 1 : 0) === 1) {
- $cache = &$this->lazyCache;
+ $this->lazyCache[$row['appid']][$row['configkey']] = $row['configvalue'] ?? '';
} else {
- $cache = &$this->fastCache;
+ $this->fastCache[$row['appid']][$row['configkey']] = $row['configvalue'] ?? '';
}
- $cache[$row['appid']][$row['configkey']] = $row['configvalue'] ?? '';
$this->valueTypes[$row['appid']][$row['configkey']] = (int)($row['type'] ?? 0);
}
$result->closeCursor();