diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-10-24 18:43:02 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-10-24 18:43:02 +0200 |
commit | 4ba802d8f0a28ba138c21cd90d336e220f81a099 (patch) | |
tree | 58d92a6fb8350f9797fc6c482551fca1e2e19a52 /system | |
parent | 8b15c6111c2f301fa38e68aad3daa51097af1f0c (diff) |
added a conditional for $this->port in the mysqli driver. Apparently it doesn't like being sent an empty string.
Diffstat (limited to 'system')
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 4bbe5ebf6..f72db64b6 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -60,7 +60,15 @@ class CI_DB_mysqli_driver extends CI_DB { */
function db_connect()
{
- return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database, $this->port);
+ if ($this->port != '')
+ {
+ return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database, $this->port);
+ }
+ else
+ {
+ return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database);
+ }
+
}
// --------------------------------------------------------------------
|