Merge pull request #127 from lanort/patch-1
Update FormBuilder.php: fix to get selected value with 0 as index
This commit is contained in:
commit
f620ae4b9c
1 file changed
+1
-1
+1
-1
@@ -694,7 +694,7 @@ class FormBuilder
|
|||||||
protected function getSelectedValue($value, $selected)
|
protected function getSelectedValue($value, $selected)
|
||||||
{
|
{
|
||||||
if (is_array($selected)) {
|
if (is_array($selected)) {
|
||||||
return in_array($value, $selected) ? 'selected' : null;
|
return in_array($value, $selected, true) ? 'selected' : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((string) $value == (string) $selected) ? 'selected' : null;
|
return ((string) $value == (string) $selected) ? 'selected' : null;
|
||||||
|
|||||||
Reference in new issue
Block a user