From ffd1a86dcc788684981848ca1f7a2b6e93f90eb4 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Mon, 11 Oct 2021 11:16:23 +0900 Subject: [PATCH] Force DB IO db_port to INT because it must be INT --- www/lib/CoreLibs/DB/IO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/lib/CoreLibs/DB/IO.php b/www/lib/CoreLibs/DB/IO.php index 14ed4260..bd639207 100644 --- a/www/lib/CoreLibs/DB/IO.php +++ b/www/lib/CoreLibs/DB/IO.php @@ -332,7 +332,7 @@ class IO extends \CoreLibs\Basic $this->db_user = $db_config['db_user'] ?? ''; $this->db_pwd = $db_config['db_pass'] ?? ''; $this->db_host = $db_config['db_host'] ?? ''; - $this->db_port = !empty($db_config['db_port']) ? $db_config['db_port'] : 5432; + $this->db_port = !empty($db_config['db_port']) ? (int)$db_config['db_port'] : 5432; // do not set to 'public' if not set, because the default is already public $this->db_schema = !empty($db_config['db_schema']) ? $db_config['db_schema'] : ''; $this->db_encoding = !empty($db_config['db_encoding']) ? $db_config['db_encoding'] : '';