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:
@@ -19,7 +19,10 @@ class Af_Comics extends Plugin {
|
||||
|
||||
require_once __DIR__ . "/filter_base.php";
|
||||
|
||||
$filters = array_merge(glob(__DIR__ . "/filters.local/*.php"), glob(__DIR__ . "/filters/*.php"));
|
||||
$filters = [
|
||||
...(glob(__DIR__ . "/filters.local/*.php") ?: []),
|
||||
...(glob(__DIR__ . "/filters/*.php") ?: []),
|
||||
];
|
||||
$names = [];
|
||||
|
||||
foreach ($filters as $file) {
|
||||
|
||||
Reference in New Issue
Block a user