From 89af23bbb936d418466ea69265020c206f5febec Mon Sep 17 00:00:00 2001 From: Keith Silgard Date: Tue, 22 Apr 2014 14:07:35 -0600 Subject: [PATCH] FormBuilder::checkbox can't be checked without session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the value of FormBuilder::session is null, it’s not possible to set a checkbox to checked. --- FormBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FormBuilder.php b/FormBuilder.php index 9f50bf3..53b880c 100755 --- a/FormBuilder.php +++ b/FormBuilder.php @@ -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;