Combine code paths.

At the end of both if/else arms we should have an array that can be
pushed through Hash::filter().

Refs #8654
This commit is contained in:
mark_story 2016-06-28 22:06:53 -04:00
parent 57e0a97483
commit 7c2d6ae197

View file

@ -663,11 +663,10 @@ class FormHelper extends AppHelper {
if (!$field) {
$field = $this->entity();
} elseif (is_string($field)) {
$field = Hash::filter(explode('.', $field));
$field = explode('.', $field);
}
if (is_array($field)) {
$field = array_filter($field, 'strlen');
$field = Hash::filter($field);
}
foreach ($this->_unlockedFields as $unlockField) {