pdo connection string: properly check for DB_PORT
This commit is contained in:
parent
1f16f9b8ae
commit
28040002f3
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ class Db implements IDb {
|
|||
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,
|
||||
DB_USER,
|
||||
|
|
Loading…
Reference in a new issue