Skip to content
Extraits de code Groupes Projets
Valider d60c6f3b rédigé par Matthieu Aubry's avatar Matthieu Aubry Validation de GitHub
Parcourir les fichiers

Merge pull request #10634 from piwik/when_installing_without_writable_tmp_folder_show_useful_msg

 If Piwik is not installed yet, it's possible the tmp/ folder is not writable, display a useful error message
parents b27cbb96 f771d576
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -45,10 +45,17 @@ return array( ...@@ -45,10 +45,17 @@ return array(
return $cache; return $cache;
}, },
'Piwik\Cache\Backend' => function (ContainerInterface $c) { 'Piwik\Cache\Backend' => function (ContainerInterface $c) {
try { // If Piwik is not installed yet, it's possible the tmp/ folder is not writable
$backend = $c->get('ini.Cache.backend'); // we prevent failing with an unclear message eg. coming from doctrine-cache
} catch (NotFoundException $ex) { // by forcing to use a cache backend which always works ie. array
$backend = 'chained'; // happens if global.ini.php is not available if(!\Piwik\SettingsPiwik::isPiwikInstalled()) {
$backend = 'array';
} else {
try {
$backend = $c->get('ini.Cache.backend');
} catch (NotFoundException $ex) {
$backend = 'chained'; // happens if global.ini.php is not available
}
} }
return \Piwik\Cache::buildBackend($backend); return \Piwik\Cache::buildBackend($backend);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter