cast port to int

This commit is contained in:
Hugo Chinchilla 2024-10-01 10:56:44 +02:00
parent b0a5c404e7
commit 17b49a005e

View file

@ -45,6 +45,7 @@ function pwg_db_connect($host, $user, $password, $database)
elseif (strpos($host, ':') !== false) elseif (strpos($host, ':') !== false)
{ {
list($host, $port) = explode(':', $host); list($host, $port) = explode(':', $host);
$port = (int) $port;
} }
$dbname = ''; $dbname = '';