Do not fail if the icon file doesn't exists

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-11-12 17:31:54 +01:00
parent 9e1ec0cf46
commit 4acd053e4d
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 2 additions and 2 deletions

View File

@ -120,8 +120,8 @@ class IconsCacher {
$list .= "--$icon: url('$url');";
list($location,$color) = $this->parseUrl($url);
$svg = false;
if ($location !== '') {
$svg = file_get_contents($location);
if ($location !== '' && \file_exists($location)) {
$svg = \file_get_contents($location);
}
if ($svg === false) {
$this->logger->debug('Failed to get icon file ' . $location);