Fix FormFile::list_of_autoecmfiles object_instance classname after hook

FormFile::list_of_autoecmfiles() can instantiate object with parameters
resulting of hook `addSectionECMAuto` but for do this,
it use `${$hookmanager->resArray['classname']}` which return a
`null`. Instead we should do this
`$hookmanager->resArray['classname']`.
This commit is contained in:
Indelog 2021-09-28 12:08:45 +02:00
parent 0750d4bb6e
commit 2472dff67b

View File

@ -1672,7 +1672,7 @@ class FormFile
dol_include_once($hookmanager->resArray['classpath']);
if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) {
if (class_exists($hookmanager->resArray['classname'])) {
$object_instance = new ${$hookmanager->resArray['classname']}($this->db);
$object_instance = new $hookmanager->resArray['classname']($this->db);
}
}
}