From 277b81ce1bce0c3e0a30d27e0ca6ae3dfc64e0f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Sep 2022 22:08:06 +0200 Subject: [PATCH] Fix loop --- htdocs/core/class/html.formfile.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 675300169e4..80cd8bb79e2 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1782,6 +1782,8 @@ class FormFile $result = 0; if (is_object($object_instance)) { + $object_instance->id = 0; + $object_instance->ref = ''; if ($id) { $result = $object_instance->fetch($id); } else {