Merge branch '5.4' of https://github.com/LaravelCollective/html into 5.4
This commit is contained in:
commit
8c8cea0c3b
2 files changed
+13
-1
No files matched your search
+1
-1
@@ -760,7 +760,7 @@ class FormBuilder
|
||||
protected function getSelectedValue($value, $selected)
|
||||
{
|
||||
if (is_array($selected)) {
|
||||
return in_array($value, $selected, true) ? 'selected' : null;
|
||||
return in_array($value, $selected, true) || in_array((string) $value, $selected, true) ? 'selected' : null;
|
||||
} elseif ($selected instanceof Collection) {
|
||||
return $selected->contains($value) ? 'selected' : null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user