Skip to content
This repository
Browse code

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

…e installer.
  • Loading branch information...
commit aaf91154a26f35d5e82ab444618cc10e3651dc59 1 parent d58e374
Sean Harvey authored May 19, 2012
9  dev/install/MySQLDatabaseConfigurationHelper.php
@@ -30,12 +30,13 @@ public function requireDatabaseServer($databaseConfig) {
30 30
 		$success = false;
31 31
 		$error = '';
32 32
 		$conn = @new MySQLi($databaseConfig['server'], $databaseConfig['username'], $databaseConfig['password']);
33  
-		if($conn && $conn->connect_errno < 2000) {
34  
-			$success = true;
35  
-		} else {
  33
+		if($conn && $conn->connect_errno) {
36 34
 			$success = false;
37  
-			$error = ($conn) ? $conn->connect_error : '';
  35
+			$error = $conn->connect_error;
  36
+		} else {
  37
+			$success = true;
38 38
 		}
  39
+
39 40
 		return array(
40 41
 			'success' => $success,
41 42
 			'error' => $error

0 notes on commit aaf9115

Please sign in to comment.
Something went wrong with that request. Please try again.