Do not fail if the icon file doesn't exists
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
9e1ec0cf46
commit
4acd053e4d
|
@ -120,8 +120,8 @@ class IconsCacher {
|
||||||
$list .= "--$icon: url('$url');";
|
$list .= "--$icon: url('$url');";
|
||||||
list($location,$color) = $this->parseUrl($url);
|
list($location,$color) = $this->parseUrl($url);
|
||||||
$svg = false;
|
$svg = false;
|
||||||
if ($location !== '') {
|
if ($location !== '' && \file_exists($location)) {
|
||||||
$svg = file_get_contents($location);
|
$svg = \file_get_contents($location);
|
||||||
}
|
}
|
||||||
if ($svg === false) {
|
if ($svg === false) {
|
||||||
$this->logger->debug('Failed to get icon file ' . $location);
|
$this->logger->debug('Failed to get icon file ' . $location);
|
||||||
|
|
Loading…
Reference in New Issue