From 4acd053e4d2d09b28848af69c4ed32d18f9b1ee8 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Mon, 12 Nov 2018 17:31:54 +0100 Subject: Do not fail if the icon file doesn't exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Template/IconsCacher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php index 1020cd24dcd..aab3295405d 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); -- cgit v1.2.3