From d5acc85ef08f8f4fd113ab441c5da13568f37d48 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Fri, 14 Aug 2020 12:18:28 +0200 Subject: [PATCH] FIX param entity in html form file --- htdocs/core/class/html.formfile.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 2508ebce5ca..53e19a560f0 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -352,7 +352,9 @@ class FormFile // Add entity in $param if not already exists if (!preg_match('/entity\=[0-9]+/', $param)) { - $param.= 'entity='.(!empty($object->entity)?$object->entity:$conf->entity); + $paramEntity = 'entity='.(!empty($object->entity)?$object->entity:$conf->entity); + if (!empty($param)) $paramEntity = '&' .$paramEntity; + $param .= $paramEntity; } $printer=0;