Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Avoid reference use in AppConfig
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Apr 30, 2024
commit eb25e10f5590d48400af1f7c99f7a363bd9394df
10 changes: 4 additions & 6 deletions lib/private/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,11 +850,10 @@ private function setTypedValue(

// 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;
Expand Down Expand Up @@ -1264,11 +1263,10 @@ private function loadConfig(?bool $lazy = false): void {
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();
Expand Down