diff --git a/classes/db.php b/classes/db.php index aba249a5..1a4d0b2e 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,