summaryrefslogtreecommitdiff
path: root/classes/DiskCache.php
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2024-12-10 18:58:17 +0000
committerwn_ <invalid@email.com>2024-12-14 12:26:59 +0000
commit1742fb65c53a2a6cd6a310d225add25ee20c14b6 (patch)
treef7a7d60a227f9e469b5644b7a15fe21352080b4d /classes/DiskCache.php
parentd5b1258d294fb8b0e43344a9925a9202925fcb02 (diff)
Use the spread operator instead of 'array_merge' in more places.
PHP 8.1 introduced support for merging string-key arrays (last array with a wins).
Diffstat (limited to 'classes/DiskCache.php')
-rw-r--r--classes/DiskCache.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/classes/DiskCache.php b/classes/DiskCache.php
index 249079b36..c52759a75 100644
--- a/classes/DiskCache.php
+++ b/classes/DiskCache.php
@@ -301,8 +301,11 @@ class DiskCache implements Cache_Adapter {
if ($this->exists($local_filename) && !$force)
return true;
- $data = UrlHelper::fetch(array_merge(["url" => $url,
- "max_size" => Config::get(Config::MAX_CACHE_FILE_SIZE)], $options));
+ $data = UrlHelper::fetch([
+ 'url' => $url,
+ 'max_size' => Config::get(Config::MAX_CACHE_FILE_SIZE),
+ ...$options,
+ ]);
if ($data)
return $this->put($local_filename, $data) > 0;