diff options
author | Andrew Dolgov <[email protected]> | 2017-12-03 13:37:43 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-12-03 13:37:43 +0300 |
commit | 28040002f35b684c782c718848a8e372280e0020 (patch) | |
tree | 4731823d45704bafbd7c7fb7aab9a5e1965ac7e4 | |
parent | 1f16f9b8ae77bcd2f3610f6e6e44bd2a24d3a660 (diff) |
pdo connection string: properly check for DB_PORT
-rw-r--r-- | classes/db.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/db.php b/classes/db.php index aba249a50..1a4d0b2ee 100644 --- a/classes/db.php +++ b/classes/db.php @@ -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, |