FormBuilder::checkbox can't be checked without session

If the value of FormBuilder::session is null, it’s not possible to set
a checkbox to checked.
This commit is contained in:
Keith Silgard committed 2014-04-22 14:07:35 -06:00
1 parent 44de610b3d
commit 89af23bbb9
1 file changed
+1 -1
+1 -1
View File
@@ -639,7 +639,7 @@ class FormBuilder {
*/
protected function getCheckboxCheckedState($name, $value, $checked)
{
if ( ! $this->oldInputIsEmpty() && is_null($this->old($name))) return false;
if (isset($this->session) && ! $this->oldInputIsEmpty() && is_null($this->old($name))) return false;
if ($this->missingOldAndModel($name)) return $checked;