Fixes for #337 and #259

This commit is contained in:
mlantz committed 2017-05-19 04:15:59 -04:00
1 parent c0dc174809
commit 4aae8fb438
1 file changed
+3
+3
View File
@@ -739,6 +739,8 @@ class FormBuilder
{
if (is_array($selected)) {
return in_array($value, $selected) ? 'selected' : null;
} elseif ($selected instanceof Collection) {
return $selected->contains($value) ? 'selected' : null;
}
return ((string) $value == (string) $selected) ? 'selected' : null;
@@ -1128,6 +1130,7 @@ class FormBuilder
if ($hasNullMiddleware
&& is_null($old)
&& is_null($value)
&& !is_null($this->view->shared('errors'))
&& count($this->view->shared('errors')) > 0
) {