diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-02-27 10:49:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 10:49:02 +0100 |
commit | d0a6368a8bc9b03cba66c4a485aa001da187b2e3 (patch) | |
tree | f4911a45e05f5a95019b9d13045ef1094d11dab2 | |
parent | cd3eb80ef4e9613e16430cb4c53332ac3cdae97a (diff) | |
parent | e2cd33adfe8735dd4048591922f55499406dec80 (diff) | |
download | nextcloud-server-d0a6368a8bc9b03cba66c4a485aa001da187b2e3.tar.gz nextcloud-server-d0a6368a8bc9b03cba66c4a485aa001da187b2e3.zip |
Merge pull request #8557 from nextcloud/fix-theming-defaults
Fix check if theming defaults instance is available
-rw-r--r-- | lib/private/URLGenerator.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index c72c2255179..6f4f869238c 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -35,6 +35,7 @@ declare(strict_types=1); namespace OC; +use OCA\Theming\ThemingDefaults; use OCP\ICacheFactory; use OCP\IConfig; use OCP\IRequest; @@ -168,7 +169,10 @@ class URLGenerator implements IURLGenerator { $themingEnabled = $this->config->getSystemValue('installed', false) && \OCP\App::isEnabled('theming') && \OC_App::isAppLoaded('theming'); $themingImagePath = false; if($themingEnabled) { - $themingImagePath = \OC::$server->getThemingDefaults()->replaceImagePath($app, $image); + $themingDefaults = \OC::$server->getThemingDefaults(); + if ($themingDefaults instanceof ThemingDefaults) { + $themingImagePath = $themingDefaults->replaceImagePath($app, $image); + } } if (file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$image")) { |