diff options
author | Julius Haertl <jus@bitgrid.net> | 2016-10-17 16:31:07 +0200 |
---|---|---|
committer | Julius Haertl <jus@bitgrid.net> | 2016-11-18 10:23:25 +0100 |
commit | 3a400f92d1936b2b752d813cbb27632d6acb9904 (patch) | |
tree | 3b9ab6f150ab8f54f457cb4eb0ec3a1e56a7049f /apps/theming/lib/ImageManager.php | |
parent | cc8b1d382910e13c0825e5a3fdb33276f65cf2bd (diff) | |
download | nextcloud-server-3a400f92d1936b2b752d813cbb27632d6acb9904.tar.gz nextcloud-server-3a400f92d1936b2b752d813cbb27632d6acb9904.zip |
Replace null return with NotFoundException
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/lib/ImageManager.php')
-rw-r--r-- | apps/theming/lib/ImageManager.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/theming/lib/ImageManager.php b/apps/theming/lib/ImageManager.php index 5e1b61e3a92..e7dcfa92190 100644 --- a/apps/theming/lib/ImageManager.php +++ b/apps/theming/lib/ImageManager.php @@ -71,15 +71,12 @@ class ImageManager { * Get a file from AppData * * @param string $filename - * @return null|\OCP\Files\SimpleFS\ISimpleFile + * @throws NotFoundException + * @return \OCP\Files\SimpleFS\ISimpleFile */ public function getCachedImage($filename) { $currentFolder = $this->getCacheFolder(); - if($currentFolder->fileExists($filename)) { - return $currentFolder->getFile($filename); - } else { - return null; - } + return $currentFolder->getFile($filename); } /** |