From 824087416a2469cf044b4a9193a0047c6c889333 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Sun, 14 Feb 2010 17:07:31 -0800 Subject: Avoid PHP warnings when the DB host string has no port. --- installer/installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'installer/installer.php') diff --git a/installer/installer.php b/installer/installer.php index 57be6cc0..705f1725 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -77,7 +77,7 @@ class installer { // counterparts. if (!function_exists("mysql_query")) { function mysql_connect($host, $user, $pass) { - list ($host, $port) = explode(":", $host); + list ($host, $port) = explode(":", $host . ":"); installer::$mysqli = new mysqli($host, $user, $pass, $port); // http://php.net/manual/en/mysqli.connect.php says to use mysqli_connect_error() instead of // $mysqli->connect_error because of bugs before PHP 5.2.9 -- cgit v1.2.3