Address PHPStan findings as of 2.0.1

This commit is contained in:
wn_
2024-11-12 03:15:53 +00:00
parent e4c57769e0
commit a784305cc7
17 changed files with 106 additions and 118 deletions

View File

@@ -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();
$script = $p->get_prefs_js();
if ($script) {
echo "try {
$script
} catch (e) {
console.warn('failed to initialize plugin JS: $n', e);
}";
}
if ($script) {
echo "try {
$script
} catch (e) {
console.warn('failed to initialize plugin JS: $n', e);
}";
}
}
?>