From 23516ed5fa3b3f4cf66a96c39a2a23062d29ce6e Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 19 Mar 2024 18:46:30 +0100 Subject: [PATCH] Fix arg type for str_replace() with cast --- htdocs/core/db/pgsql.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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