From ec6ce43053bcf3963ca44e04f13cdab2d25282b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 26 Jun 2019 10:53:49 +0200 Subject: [PATCH] Only return link to themed icon if file exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/theming/lib/ThemingDefaults.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 6e93515eb5..8e65fafe85 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -349,7 +349,7 @@ class ThemingDefaults extends \OC_Defaults { } catch (AppPathNotFoundException $e) {} return $this->urlGenerator->linkToRoute('theming.Theming.getManifest') . '?v=' . $cacheBusterValue; } - if (strpos($image, 'filetypes/') === 0) { + if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image )) { return $this->urlGenerator->linkToRoute('theming.Icon.getThemedIcon', ['app' => $app, 'image' => $image]); } return false;