Skip to content

Commit

Permalink
Fix crash about undefined array key
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored Feb 22, 2024
1 parent 2eeb0c2 commit b03c56d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed

- Fix crash about undefined array key

## [1.21.7] - 2024-02-22

Expand Down
3 changes: 1 addition & 2 deletions inc/container.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1439,13 +1439,12 @@ public static function validateValues($data, $itemtype, $massiveaction)
'plugin_fields_containers_id' => $data['plugin_fields_containers_id']
]);


$status_value = null;
$relatedItem = new $data['itemtype']();
$status_field_name = PluginFieldsStatusOverride::getStatusFieldName($itemtype);
if ($container->fields['type'] === 'dom') {
$status_value = $data[$status_field_name] ?? null;
} else {
$relatedItem = new $itemtype();
$status_value = $relatedItem->fields[$status_field_name] ?? null;
}
// Apply status overrides
Expand Down

0 comments on commit b03c56d

Please sign in to comment.