diff options
author | Matthieu Aubry <matt@piwik.org> | 2014-10-09 14:55:20 +0400 |
---|---|---|
committer | Matthieu Aubry <matt@piwik.org> | 2014-10-09 14:55:20 +0400 |
commit | 3f6141c12df003838d45cb2fa60b9ea49f4d9dac (patch) | |
tree | 4eee12359a49d6f134eb6c8a9bdcf1669bb3ea2a /core | |
parent | dad8a6aab09226ed0952290b9f94dd1a63b96c9d (diff) |
Fixes #6375 refs #5958 Only set 500 headers when a database failure occurs #hacky
Diffstat (limited to 'core')
-rw-r--r-- | core/testMinimumPhpVersion.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/testMinimumPhpVersion.php b/core/testMinimumPhpVersion.php index 542279f872..8fcface7f8 100644 --- a/core/testMinimumPhpVersion.php +++ b/core/testMinimumPhpVersion.php @@ -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) { |