From cd984fa6c5b2eb1e9812ef46baf2fbd0005e0e98 Mon Sep 17 00:00:00 2001 From: noec764 <58433943+noec764@users.noreply.github.com> Date: Mon, 17 Nov 2025 21:18:28 +0100 Subject: [PATCH] FIX: Object should be cloned here (#36289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: NoƩ --- htdocs/categories/class/categorie.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 141401b43b2..2d4f3bab5aa 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -958,7 +958,7 @@ class Categorie extends CommonObject $obj->id = 0; $obj->fetch($rec['fk_object']); if ($obj->id > 0) { // Failing fetch may happen for example when a category supplier was set and third party was moved as customer only. The object supplier can't be loaded. - $objs[] = $obj; + $objs[] = clone $obj; } } }