From 1bcd23f6845ffb3836dd32203ac05be85c118c4a Mon Sep 17 00:00:00 2001 From: "Dr. Tobias Quathamer" Date: Wed, 13 Mar 2024 15:39:21 +0100 Subject: [PATCH] Simplify providing a default empty array --- url_replace/url_replace.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/url_replace/url_replace.php b/url_replace/url_replace.php index de16234f..7710a2e1 100644 --- a/url_replace/url_replace.php +++ b/url_replace/url_replace.php @@ -47,7 +47,7 @@ function url_replace_addon_admin(string &$o) { $nitter_server = DI::config()->get('url_replace', 'nitter_server'); $invidious_server = DI::config()->get('url_replace', 'invidious_server'); - $twelvefeet_sites = implode(PHP_EOL, DI::config()->get('url_replace', 'twelvefeet_sites') ?? [] ?: []); + $twelvefeet_sites = implode(PHP_EOL, DI::config()->get('url_replace', 'twelvefeet_sites') ?? []); $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/url_replace/'); $o = Renderer::replaceMacros($t, [ @@ -114,7 +114,7 @@ function url_replace_render(array &$b) } } - $twelvefeet_sites = DI::config()->get('url_replace', 'twelvefeet_sites') ?? [] ?: []; + $twelvefeet_sites = DI::config()->get('url_replace', 'twelvefeet_sites') ?? []; foreach ($twelvefeet_sites as $twelvefeet_site) { if (strpos($b['html'], $twelvefeet_site) !== false) { $b['html'] = str_replace($twelvefeet_site, 'https://12ft.io/' . $twelvefeet_site, $b['html']);