Replace use of 'array_merge' with the spread operator and 'array_push' in various places.
This isn't supported for arrays with string keys until PHP 8.1. https://wiki.php.net/rfc/spread_operator_for_array
This commit is contained in:
@@ -84,10 +84,10 @@ class Cache_Starred_Images extends Plugin {
|
||||
|
||||
Debug::log("expiring {$this->cache->get_dir()} and {$this->cache_status->get_dir()}...");
|
||||
|
||||
$files = array_merge(
|
||||
glob($this->cache->get_dir() . "/*-*"),
|
||||
glob($this->cache_status->get_dir() . "/*.status")
|
||||
);
|
||||
$files = [
|
||||
...(glob($this->cache->get_dir() . "/*-*") ?: []),
|
||||
...(glob($this->cache_status->get_dir() . "/*.status") ?: []),
|
||||
];
|
||||
|
||||
asort($files);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user