Skip to content
Extraits de code Groupes Projets
Valider 91dc08c3 rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Fix error that occurs when config section is empty in config.ini.php (like...

Fix error that occurs when config section is empty in config.ini.php (like when [Segments] section is empty) and make visualization loading error log more informative.
parent b7d48ea1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -357,7 +357,10 @@ class Config extends Singleton
$section = $this->getFromGlobalConfig($name);
$sectionCommon = $this->getFromCommonConfig($name);
if(empty($section)) {
if (empty($section)
&& !empty($sectionCommon)
) {
$section = $sectionCommon;
} elseif(!empty($section) && !empty($sectionCommon)) {
$section = $this->array_merge_recursive_distinct($section, $sectionCommon);
......
......@@ -179,7 +179,7 @@ class Visualization extends ViewDataTable
} catch (NoAccessException $e) {
throw $e;
} catch (\Exception $e) {
Log::warning("Failed to get data from API: " . $e->getMessage());
Log::warning("Failed to get data from API: " . $e->getMessage() . "\n" . $e->getTraceAsString());
$loadingError = array('message' => $e->getMessage());
}
......
......@@ -74,7 +74,7 @@ if (!function_exists('Piwik_ExitWithMessage')) {
{
$bool = (defined('PIWIK_PRINT_ERROR_BACKTRACE') && PIWIK_PRINT_ERROR_BACKTRACE)
|| (defined('PIWIK_TRACKER_DEBUG') && PIWIK_TRACKER_DEBUG);
return $bool;
return true;//$bool;
}
/**
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter