From b0816499078338f8c20c484f20f8395daf2528ab Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Fri, 20 May 2022 22:05:13 +0200 Subject: [PATCH] Fix fatal error and missing param --- htdocs/core/class/html.formsetup.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index b26438fd9e9..a69135454df 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -653,7 +653,7 @@ class FormSetupItem public function saveConfValue() { if (!empty($this->saveCallBack) && is_callable($this->saveCallBack)) { - return call_user_func($this->saveCallBack); + return call_user_func($this->saveCallBack, $this); } // Modify constant only if key was posted (avoid resetting key to the null value) @@ -1013,6 +1013,7 @@ class FormSetupItem } $out.= $this->langs->trans($template->label); } elseif (preg_match('/category:/', $this->type)) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $c = new Categorie($this->db); $result = $c->fetch($this->fieldValue); if ($result < 0) {