pdo connection string: properly check for DB_PORT
This commit is contained in:
parent
1f16f9b8ae
commit
28040002f3
|
@ -25,7 +25,7 @@ class Db implements IDb {
|
||||||
exit(100);
|
exit(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_port = defined(DB_PORT) ? ';port='.DB_PORT : '';
|
$db_port = defined('DB_PORT') && DB_PORT ? ';port='.DB_PORT : '';
|
||||||
|
|
||||||
$this->pdo = new PDO(DB_TYPE . ':dbname='.DB_NAME.';host='.DB_HOST.$db_port,
|
$this->pdo = new PDO(DB_TYPE . ':dbname='.DB_NAME.';host='.DB_HOST.$db_port,
|
||||||
DB_USER,
|
DB_USER,
|
||||||
|
|
Loading…
Reference in New Issue