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

Fixes #6375 refs #5958 Only set 500 headers when a database failure occurs #hacky

parent dad8a6aa
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -91,7 +91,11 @@ if (!function_exists('Piwik_ExitWithMessage')) {
{
if (!headers_sent()) {
header('Content-Type: text/html; charset=utf-8');
header('HTTP/1.1 500 Internal Server Error');
$isInternalServerError = preg_match('/(sql|database|mysql)/i', $message);
if($isInternalServerError) {
header('HTTP/1.1 500 Internal Server Error');
}
}
if ($optionalTrace) {
......
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