diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-11-04 02:21:27 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-11-04 02:21:27 +0300 |
commit | 8ee8bf2583802cabb5c85de535df0e3a60fc668e (patch) | |
tree | 6eb27d130ddaa0e940379443c1decbdfec64cf3c /plugins/CoreAdminHome/CustomLogo.php | |
parent | 7f7a64993d82d5baf36035f44e7a07e784bd3351 (diff) |
Fix error when Piwik is not installed yet
Diffstat (limited to 'plugins/CoreAdminHome/CustomLogo.php')
-rw-r--r-- | plugins/CoreAdminHome/CustomLogo.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/CoreAdminHome/CustomLogo.php b/plugins/CoreAdminHome/CustomLogo.php index eda7ef0638..76f328e139 100644 --- a/plugins/CoreAdminHome/CustomLogo.php +++ b/plugins/CoreAdminHome/CustomLogo.php @@ -11,6 +11,7 @@ namespace Piwik\Plugins\CoreAdminHome; use Piwik\Config; use Piwik\Filesystem; use Piwik\Option; +use Piwik\Plugin\Manager; use Piwik\SettingsPiwik; class CustomLogo @@ -114,7 +115,12 @@ class CustomLogo $logo = $defaultLogo; - $themeName = \Piwik\Plugin\Manager::getInstance()->getThemeEnabled()->getPluginName(); + $theme = \Piwik\Plugin\Manager::getInstance()->getThemeEnabled(); + if(!$theme) { + $themeName = Manager::DEFAULT_THEME; + } else { + $themeName = $theme->getPluginName(); + } $themeLogo = sprintf($themeLogo, $themeName); if (file_exists($pathToPiwikRoot . '/' . $themeLogo)) { |