Merge pull request #18839 from indelog/fix_list_of_autoecmfiles

Fix FormFile::list_of_autoecmfiles object_instance classname after hook
This commit is contained in:
Laurent Destailleur 2021-09-30 13:39:16 +02:00 committed by GitHub
commit ee79df9bc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1674,7 +1674,8 @@ 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);
$tmpclassname = $hookmanager->resArray['classname'];
$object_instance = new $tmpclassname($this->db);
}
}
}