diff options
-rw-r--r-- | misc/cron/updatetoken.php | 3 | ||||
-rw-r--r-- | plugins/CoreAdminHome/CustomLogo.php | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/misc/cron/updatetoken.php b/misc/cron/updatetoken.php index ff02e4f30a..4638f8bd27 100644 --- a/misc/cron/updatetoken.php +++ b/misc/cron/updatetoken.php @@ -40,8 +40,7 @@ function getPiwikDomain() { foreach($_SERVER['argv'] as $param) { $pattern = '--piwik-domain='; - $equalSign = strpos($param, $pattern); - if($equalSign !== false) { + if(false !== strpos($param, $pattern)) { return substr($param, strlen($pattern)); } } 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)) { |