Skip to content

Commit

Permalink
Check class existence before creating its config
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Feb 2, 2022
1 parent d939289 commit 911ed52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/configfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static function install(Migration $migration) {

$field = new self();
foreach ($GENINVENTORYNUMBER_TYPES as $type) {
if (!countElementsInTable($table, ['itemtype' => $type])) {
if (class_exists($type) && !countElementsInTable($table, ['itemtype' => $type])) {
$input["plugin_geninventorynumber_configs_id"] = 1;
$input["itemtype"] = $type;
$input["template"] = "<#######>";
Expand Down

0 comments on commit 911ed52

Please sign in to comment.