From fed9cec88b8ced9c5c31778e47be07ba43436da9 Mon Sep 17 00:00:00 2001 From: Jonas Hansen Date: Wed, 8 Feb 2017 15:59:23 +0100 Subject: [PATCH] Changed mysql pdo port empty check, to fix problem with mysql cant connect, when using custom port --- src/psm/Service/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/psm/Service/Database.php b/src/psm/Service/Database.php index 16ff69fc..15cbf101 100644 --- a/src/psm/Service/Database.php +++ b/src/psm/Service/Database.php @@ -90,7 +90,7 @@ class Database { function __construct($host = null, $user = null, $pass = null, $db = null, $port = null) { if($host != null && $user != null && $pass !== null && $db != null) { $this->db_host = $host; - $this->db_port = $port || 3306; + $this->db_port = (!empty($port)) ? $port : 3306; $this->db_name = $db; $this->db_user = $user; $this->db_pass = $pass;