Skip to content
Permalink
Browse files

Use empty() instead of implicit cast.

  • Loading branch information...
markstory committed Dec 16, 2015
1 parent a947fc4 commit 268dfa38d2d9684967785f886d5ba44e5f87e24a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/View/Helper/FormHelper.php
@@ -2356,7 +2356,7 @@ protected function _initInputField($field, $options = [])
}
$parts = explode('.', $field);
$first = array_shift($parts);
$options['name'] = $first . ($parts ? '[' . implode('][', $parts) . ']' : '') . $endsWithBrackets;
$options['name'] = $first . (!empty($parts) ? '[' . implode('][', $parts) . ']' : '') . $endsWithBrackets;
}
if (isset($options['value']) && !isset($options['val'])) {

0 comments on commit 268dfa3

Please sign in to comment.
You can’t perform that action at this time.