mirror of
https://github.com/unraid/webgui.git
synced 2026-04-20 17:02:10 -05:00
Merge pull request #421 from Squidly271/patch-24
Suppress PHP error under certain circumstances if plugin does not have an icon
This commit is contained in:
@@ -49,7 +49,7 @@ function icon($name) {
|
||||
// try alternatives if default is not present
|
||||
$icon = "plugins/$name/$name.png";
|
||||
if (file_exists($icon)) return $icon;
|
||||
$image = preg_split('/[\._- ]/',$name)[0];
|
||||
$image = @preg_split('/[\._- ]/',$name)[0];
|
||||
$icon = "plugins/$name/images/$image.png";
|
||||
if (file_exists($icon)) return $icon;
|
||||
$icon = "plugins/$name/$image.png";
|
||||
|
||||
Reference in New Issue
Block a user