Merge pull request #12420 from nextcloud/bugfix/noid/icons-cacher-not-found

Ignore icons if the file could not be found
pull/12429/head
Morris Jobke 2018-11-12 21:13:19 +07:00 committed by GitHub
commit f6fed4d54b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

@ -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);