From d90ac8eb8992da7c41701048c8931a77501afd3a Mon Sep 17 00:00:00 2001 From: Dale Davies Date: Tue, 18 Apr 2023 14:31:39 +0100 Subject: [PATCH] Log error if icon not found --- jumpapp/classes/Site.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jumpapp/classes/Site.php b/jumpapp/classes/Site.php index b88fd06..6322bc8 100644 --- a/jumpapp/classes/Site.php +++ b/jumpapp/classes/Site.php @@ -74,10 +74,15 @@ class Site { // see if we can get it from Dashboard Icons. if (pathinfo($this->iconname, PATHINFO_EXTENSION)) { $file = $this->config->get('sitesdir').'/icons/'.$this->iconname; + $errormessage = 'Icon file not found... '.$file; } else { $file = 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/svg/'.$this->iconname.'.svg'; + $errormessage = 'Dashboard icon does not exist... '.$this->iconname; + } + $rawimage = @file_get_contents($file); + if (!$rawimage) { + error_log($errormessage); } - $rawimage = file_get_contents($file); } // If we didnt manage to get any icon data from any of the above methods then return // the default icon.