Skip to content

Commit

Permalink
Don't do unnecessary checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ndm2 committed Feb 23, 2015
1 parent 2da0157 commit 188862b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/View/Helper/FormHelper.php
Expand Up @@ -1172,8 +1172,7 @@ protected function _optionsOptions($fieldName, $options)

if (substr($fieldName, -5) === '._ids') {
$fieldName = substr($fieldName, 0, -5);
}
if (substr($fieldName, -3) === '_id') {
} elseif (substr($fieldName, -3) === '_id') {
$fieldName = substr($fieldName, 0, -3);
}
$fieldName = array_slice(explode('.', $fieldName), -1)[0];
Expand Down

0 comments on commit 188862b

Please sign in to comment.