From 12e3a5cb4a03996e58e80804345cfcaaaa4ef134 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 19 Mar 2024 22:15:42 +0100 Subject: [PATCH] Fix arg type to preg_replace() with cast --- htdocs/projet/tasks.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 23aac791656..c3e91e95c88 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2005-2017 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 @@ -563,7 +564,7 @@ if ($id > 0 || !empty($ref)) { 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").'';