\Piwik\Plugin\Manager::getThemeEnabled is returning either an object or false, but \Piwik\Plugin\Manager::deactivateThemeIfTheme does not check for false, so there is a condition missing, if there is not theme available the default one should be activated, anyway any error should be avoided
private function deactivateThemeIfTheme($pluginName)
{
// Only one theme enabled at a time
$themeEnabled = $this->getThemeEnabled();
if($themeEnabled !== false) {
if ($themeEnabled->getPluginName() != self::DEFAULT_THEME) {
$themeAlreadyEnabled = $themeEnabled->getPluginName();
$plugin = $this->loadPlugin($pluginName);
if ($plugin->isTheme()) {
$this->deactivatePlugin($themeAlreadyEnabled);
}
}
}
}
PS: I found that bug while upgrading my TYPO3 Integration plugin for TYPO3 ...
\Piwik\Plugin\Manager::getThemeEnabled is returning either an object or false, but \Piwik\Plugin\Manager::deactivateThemeIfTheme does not check for false, so there is a condition missing, if there is not theme available the default one should be activated, anyway any error should be avoided
PS: I found that bug while upgrading my TYPO3 Integration plugin for TYPO3 ...