mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 08:58:25 +00:00
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:
parent
57e0a97483
commit
7c2d6ae197
1 changed files with 2 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue