From: Andrew Dolgov Date: Sun, 3 Dec 2017 10:37:43 +0000 (+0300) Subject: pdo connection string: properly check for DB_PORT X-Git-Tag: 17.12~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=28040002f35b684c782c718848a8e372280e0020;p=tt-rss.git pdo connection string: properly check for DB_PORT --- 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,