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; } } }