From 28040002f35b684c782c718848a8e372280e0020 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 3 Dec 2017 13:37:43 +0300 Subject: [PATCH] pdo connection string: properly check for DB_PORT --- classes/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,