From 4acd053e4d2d09b28848af69c4ed32d18f9b1ee8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20H=C3=A4rtl?= <jus@bitgrid.net>
Date: Mon, 12 Nov 2018 17:31:54 +0100
Subject: [PATCH] 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 <jus@bitgrid.net>
---
 lib/private/Template/IconsCacher.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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