Skip to content
Snippets Groups Projects
Commit c600fcbb authored by Dinesh Kumar Bollu's avatar Dinesh Kumar Bollu Committed by Lee Rowlands
Browse files

Issue #3425539 by jcontreras, abhishek_gupta1, dineshkumarbollu, larowlan:...

Issue #3425539 by jcontreras, abhishek_gupta1, dineshkumarbollu, larowlan: TypeError: _entity_hierarchy_update_field_weight_column(): Argument #1 ($fields) must be of type array
parent 5993d799
No related branches found
No related tags found
1 merge request!36Ensure is an array before proceeding
Pipeline #139075 passed with warnings
......@@ -26,7 +26,10 @@ function entity_hierarchy_post_update_update_weight_column(array &$sandbox): Tra
$entityType = array_shift($entityTypes);
$fields = $sandbox['fields'][$entityType];
unset($sandbox['fields'][$entityType]);
_entity_hierarchy_update_field_weight_column($fields, $entityType);
// Ensure $fields is an array before proceeding.
if (is_array($fields)) {
_entity_hierarchy_update_field_weight_column($fields, $entityType);
}
$sandbox['#finished'] = empty($sandbox['fields']) ? 1 : ($sandbox['max'] - count($sandbox['fields'])) / $sandbox['max'];
if ($sandbox['#finished'] !== 1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment