summaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/Controller/IconController.php
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2016-12-09 15:57:44 +0100
committerGitHub <noreply@github.com>2016-12-09 15:57:44 +0100
commitd10be51d40ed3e2e99c3749e5f1ba7c72b4a2e6a (patch)
tree4a3443921be3eaf45885e64a3fd27a7662004d4c /apps/theming/lib/Controller/IconController.php
parentde8908bf29d1e23f1ce5a41fcde02e1bf588b1a4 (diff)
parent5fbadee95ff11429739dc7cf818d93d0c549a73f (diff)
downloadnextcloud-server-d10be51d40ed3e2e99c3749e5f1ba7c72b4a2e6a.tar.gz
nextcloud-server-d10be51d40ed3e2e99c3749e5f1ba7c72b4a2e6a.zip
Merge pull request #2588 from nextcloud/theming-check-empty
Check if image files for theming are empty
Diffstat (limited to 'apps/theming/lib/Controller/IconController.php')
-rw-r--r--apps/theming/lib/Controller/IconController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php
index 4c25d911e5e..7c4e209d0df 100644
--- a/apps/theming/lib/Controller/IconController.php
+++ b/apps/theming/lib/Controller/IconController.php
@@ -94,6 +94,9 @@ class IconController extends Controller {
$iconFile = $this->imageManager->getCachedImage("icon-" . $app . '-' . str_replace("/","_",$image));
} catch (NotFoundException $exception) {
$icon = $this->iconBuilder->colorSvg($app, $image);
+ if ($icon === false || $icon === "") {
+ return new NotFoundResponse();
+ }
$iconFile = $this->imageManager->setCachedImage("icon-" . $app . '-' . str_replace("/","_",$image), $icon);
}
if ($iconFile !== false) {