diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index ecb9b0f0df9..cba500c0a0e 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -8,6 +8,7 @@ * Copyright (C) 2012 Yann Droneaud * Copyright (C) 2012 Florian Henry * Copyright (C) 2015 Marcos GarcĂ­a + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -416,7 +417,7 @@ class DoliDBPgsql extends DoliDB $login = str_replace(array("\\", "'"), array("\\\\", "\\'"), $login); $passwd = str_replace(array("\\", "'"), array("\\\\", "\\'"), $passwd); $name = str_replace(array("\\", "'"), array("\\\\", "\\'"), $name); - $port = str_replace(array("\\", "'"), array("\\\\", "\\'"), $port); + $port = str_replace(array("\\", "'"), array("\\\\", "\\'"), (string) $port); if (!$name) { $name = "postgres"; // When try to connect using admin user