element_children() internally builds an array of children but then calls array_keys when returning. So users that want the children have to resort to:

$children = array_intersect_key($element, array_flip(element_children($element)));

Instead should be a function to return the children (or alternatively an extra parameter the decides wether to only return keys).

CommentFileSizeAuthor
#1 2468723-element-children.patch1.83 KBgrom358
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grom358’s picture

grom358’s picture

Status: Active » Needs review
TR’s picture

Status: Needs review » Needs work

...

TR’s picture

Status: Needs work » Needs review

My mistake ...