summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-03-06 17:11:37 +0100
committerGitHub <noreply@github.com>2018-03-06 17:11:37 +0100
commit56d5eb17feff1f008f6584b24d149fe6e39b7fdc (patch)
tree30d88387c1f23f6398971f03c7c7f97ab26754ef
parent1bdf4f55cbad0dd4e871dc90fcf46642b8485f8d (diff)
parenteefbcb32ed09c8986e50e06e2ebd99b83cd67a78 (diff)
downloadnextcloud-server-56d5eb17feff1f008f6584b24d149fe6e39b7fdc.tar.gz
nextcloud-server-56d5eb17feff1f008f6584b24d149fe6e39b7fdc.zip
Merge pull request #8688 from nextcloud/13-8557
[stable13] 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 f7d80d41b4f..2da86e6d996 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -35,6 +35,7 @@
namespace OC;
+use OCA\Theming\ThemingDefaults;
use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IRequest;
@@ -170,7 +171,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")) {