This commit is contained in:
mlantz committed 2017-08-12 11:45:08 -04:00
commit 8c8cea0c3b
2 files changed
+13 -1

No files matched your search

+1 -1
View File
@@ -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;
}