diff --git a/CHANGELOG.md b/CHANGELOG.md index 17df4dbc..ae0b15af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix strpslashes log error (#802) - Update main item ```date_mod``` after updating additional fields +- Fix ```datainjection``` error when trying to map fields ## [1.21.10] - 2024-06-11 diff --git a/templates/injection.class.tpl b/templates/injection.class.tpl index 33861cb9..9e1c0dd4 100644 --- a/templates/injection.class.tpl +++ b/templates/injection.class.tpl @@ -12,16 +12,7 @@ class %%CLASSNAME%%Injection extends %%CLASSNAME%% implements PluginDatainjectio * @return string **/ static function getTable($classname = null) { - if ($classname === null) { - return ''; - } - $parent_class = get_parent_class($classname); - - if ($parent_class === false) { - return ''; - } - - return getTableForItemType($parent_class); + return getTableForItemType(get_parent_class()); } static function getTypeName($nb = 0) {