Clean up a little code in the form builder.

This commit is contained in:
Taylor Otwell committed 2013-08-27 00:15:16 -05:00
1 parent 1b09282378
commit a782b81104
1 file changed
+2 -4
+2 -4
View File
@@ -620,11 +620,9 @@ class FormBuilder {
if ($this->missingOldAndModel($name)) return $checked;
$valueAttribute = $this->getValueAttribute($name);
$posted = $this->getValueAttribute($name);
if (is_array($valueAttribute)) return in_array($value, $valueAttribute);
return (bool) $valueAttribute;
return is_array($posted) ? in_array($value, $posted) : (bool) $posted;
}
/**