Skip to content

Commit b03c56d

Browse files
authored
Fix crash about undefined array key
1 parent 2eeb0c2 commit b03c56d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Fix crash about undefined array key
1013

1114
## [1.21.7] - 2024-02-22
1215

inc/container.class.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,13 +1439,12 @@ public static function validateValues($data, $itemtype, $massiveaction)
14391439
'plugin_fields_containers_id' => $data['plugin_fields_containers_id']
14401440
]);
14411441

1442-
14431442
$status_value = null;
1444-
$relatedItem = new $data['itemtype']();
14451443
$status_field_name = PluginFieldsStatusOverride::getStatusFieldName($itemtype);
14461444
if ($container->fields['type'] === 'dom') {
14471445
$status_value = $data[$status_field_name] ?? null;
14481446
} else {
1447+
$relatedItem = new $itemtype();
14491448
$status_value = $relatedItem->fields[$status_field_name] ?? null;
14501449
}
14511450
// Apply status overrides

0 commit comments

Comments
 (0)