diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-12-19 06:15:31 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-12-19 06:15:31 +0400 |
commit | c2c2df6e0ad02b91c983a629154bcd29f42f1b53 (patch) | |
tree | 53e053bddf6d3f365d404ec92026f03430f19660 /core/Tracker/Db | |
parent | 42376c17e6dc3bfbac0b687a5ed0582e73c29e43 (diff) |
Fix notice if port empty PHP Notice: Uninitialized string offset: 0 in .../htdocs/core/Tracker/Db/Pdo/Mysql.php on line 47
Diffstat (limited to 'core/Tracker/Db')
-rw-r--r-- | core/Tracker/Db/Pdo/Mysql.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Tracker/Db/Pdo/Mysql.php b/core/Tracker/Db/Pdo/Mysql.php index b3695a2f80..9b03f1cef5 100644 --- a/core/Tracker/Db/Pdo/Mysql.php +++ b/core/Tracker/Db/Pdo/Mysql.php @@ -44,7 +44,7 @@ class Mysql extends Db { if (isset($dbInfo['unix_socket']) && $dbInfo['unix_socket'][0] == '/') { $this->dsn = $driverName . ':dbname=' . $dbInfo['dbname'] . ';unix_socket=' . $dbInfo['unix_socket']; - } else if ($dbInfo['port'][0] == '/') { + } else if (!empty($dbInfo['port']) && $dbInfo['port'][0] == '/') { $this->dsn = $driverName . ':dbname=' . $dbInfo['dbname'] . ';unix_socket=' . $dbInfo['port']; } else { $this->dsn = $driverName . ':dbname=' . $dbInfo['dbname'] . ';host=' . $dbInfo['host'] . ';port=' . $dbInfo['port']; |