1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 12:05:55 +00:00

pdo connection string: properly check for DB_PORT

This commit is contained in:
Andrew Dolgov
2017-12-03 13:37:43 +03:00
parent 1f16f9b8ae
commit 28040002f3

View File

@@ -25,7 +25,7 @@ class Db implements IDb {
exit(100); 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, $this->pdo = new PDO(DB_TYPE . ':dbname='.DB_NAME.';host='.DB_HOST.$db_port,
DB_USER, DB_USER,