Permalink
Browse files

BUGFIX If there is *any* error connecting to MySQL, expose this to th…

…e installer.
  • Loading branch information...
1 parent d58e374 commit aaf91154a26f35d5e82ab444618cc10e3651dc59 @halkyon halkyon committed May 18, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 dev/install/MySQLDatabaseConfigurationHelper.php
@@ -30,12 +30,13 @@ public function requireDatabaseServer($databaseConfig) {
$success = false;
$error = '';
$conn = @new MySQLi($databaseConfig['server'], $databaseConfig['username'], $databaseConfig['password']);
- if($conn && $conn->connect_errno < 2000) {
- $success = true;
- } else {
+ if($conn && $conn->connect_errno) {
$success = false;
- $error = ($conn) ? $conn->connect_error : '';
+ $error = $conn->connect_error;
+ } else {
+ $success = true;
}
+
return array(
'success' => $success,
'error' => $error

0 comments on commit aaf9115

Please sign in to comment.