Do not fail if the icon file doesn't exists

Signed-off-by: Julius Härtl <jus@bitgrid.net>
pull/12420/head
Julius Härtl 7 years ago
parent 9e1ec0cf46
commit 4acd053e4d
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
  1. 4
      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);

Loading…
Cancel
Save