diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php index 1020cd24dc..aab3295405 100644 --- a/lib/private/Template/IconsCacher.php +++ b/lib/private/Template/IconsCacher.php @@ -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);