I would like to propose to use core function drupal_array_get_nested_value() to find proper elements instead of custom iteration.

Patch attached.

Comments

damien tournoud’s picture

Yep. This code largely predates drupal_array_get_nested_value() finally getting into core.

damien tournoud’s picture

Status: Needs review » Fixed

Thanks for the patch! Merged the first hunk into 7.x-1.x. The second hunk now has an additional check, which prevents us from replacing it with drupal_array_get_nested_value().

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.