aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-02-27 10:49:02 +0100
committerGitHub <noreply@github.com>2018-02-27 10:49:02 +0100
commitd0a6368a8bc9b03cba66c4a485aa001da187b2e3 (patch)
treef4911a45e05f5a95019b9d13045ef1094d11dab2
parentcd3eb80ef4e9613e16430cb4c53332ac3cdae97a (diff)
parente2cd33adfe8735dd4048591922f55499406dec80 (diff)
downloadnextcloud-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.php6
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")) {