From 3487c922b3f34449fecdddebe1fd2ee3b8c42e65 Mon Sep 17 00:00:00 2001 From: wn_ Date: Fri, 12 Aug 2022 15:31:19 +0000 Subject: 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 --- plugins/cache_starred_images/init.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/cache_starred_images/init.php') diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index feec81d62..eed5264c6 100755 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -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); -- cgit v1.2.3