Skip to content

Commit

Permalink
Combine code paths.
Browse files Browse the repository at this point in the history
At the end of both if/else arms we should have an array that can be
pushed through Hash::filter().

Refs #8654
  • Loading branch information
markstory committed Jun 29, 2016
1 parent 57e0a97 commit 7c2d6ae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -663,11 +663,10 @@ protected function _secure($lock, $field = null, $value = null) {
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) {
Expand Down

0 comments on commit 7c2d6ae

Please sign in to comment.