From c924f38d84aa2a21d8a2363fbcdfe7a6475ac3ca Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 19 Mar 2024 22:15:20 +0100 Subject: [PATCH] Fix arg type to preg_replace() with cast --- htdocs/projet/comment.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php index 299b15c12fa..cceb564e7e0 100644 --- a/htdocs/projet/comment.php +++ b/htdocs/projet/comment.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2006-2017 Laurent Destailleur * Copyright (C) 2010-2012 Regis Houssin + * 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 @@ -100,7 +101,7 @@ $param = ($mode == 'mine' ? '&mode=mine' : ''); if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { $tmpurl = $_SESSION['pageforbacktolist']['project']; - $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl); $linkback = ''.$langs->trans("BackToList").''; } else { $linkback = ''.$langs->trans("BackToList").'';