diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index d6680d09e8e..25b52d8fc1c 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -8,6 +8,7 @@ * Copyright (C) 2016 Marcos García * Copyright (C) 2018-2022 Frédéric France * Copyright (C) 2022 Charlene Benke + * 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 @@ -221,8 +222,8 @@ if (empty($reshook)) { $db->commit(); - $urltogo = $backtopage ? str_replace('__ID__', $object->id, $backtopage) : $backurlforlist; - $urltogo = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $urltogo); // New method to autoselect project after a New on another form object creation + $urltogo = $backtopage ? str_replace('__ID__', (string) $object->id, $backtopage) : $backurlforlist; + $urltogo = preg_replace('/--IDFORBACKTOPAGE--/', (string) $object->id, $urltogo); // New method to autoselect project after a New on another form object creation if (empty($noback)) { header("Location: " . $urltogo);