diff options
| author | wn_ <invalid@email.com> | 2024-11-12 03:15:53 +0000 |
|---|---|---|
| committer | wn_ <invalid@email.com> | 2024-11-12 03:15:53 +0000 |
| commit | a784305cc764a7e039ad87074f541db68a653a5a (patch) | |
| tree | 508c428e11d5559c3c25ad01ffe1ba474f7da270 /prefs.php | |
| parent | e4c57769e005e75b80ec0fa206fed8ff69e58162 (diff) | |
Address PHPStan findings as of 2.0.1
Diffstat (limited to 'prefs.php')
| -rw-r--r-- | prefs.php | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -64,16 +64,14 @@ <script type="text/javascript"> <?php foreach (PluginHost::getInstance()->get_plugins() as $n => $p) { - if (method_exists($p, "get_prefs_js")) { - $script = $p->get_prefs_js(); - - if ($script) { - echo "try { - $script - } catch (e) { - console.warn('failed to initialize plugin JS: $n', e); - }"; - } + $script = $p->get_prefs_js(); + + if ($script) { + echo "try { + $script + } catch (e) { + console.warn('failed to initialize plugin JS: $n', e); + }"; } } ?> |