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:
parent
0750d4bb6e
commit
2472dff67b
@ -1672,7 +1672,7 @@ class FormFile
|
|||||||
dol_include_once($hookmanager->resArray['classpath']);
|
dol_include_once($hookmanager->resArray['classpath']);
|
||||||
if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) {
|
if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) {
|
||||||
if (class_exists($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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user