mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Return empty array if location field returns NULL.
This commit is contained in:
parent
e3110c8cec
commit
6d13a732d7
|
@ -191,7 +191,7 @@ class AssetMoveActionForm extends ConfirmFormBase {
|
|||
|
||||
// Load location assets.
|
||||
$locations = [];
|
||||
$location_ids = array_column($form_state->getValue('location', []), 'target_id');
|
||||
$location_ids = array_column($form_state->getValue('location', []) ?? [], 'target_id');
|
||||
if (!empty($location_ids)) {
|
||||
$locations = $this->entityTypeManager->getStorage('asset')->loadMultiple($location_ids);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue