From 2fc0959d9c6f3776d072ca7765489d247d42e893 Mon Sep 17 00:00:00 2001 From: BeeR Date: Wed, 11 Mar 2015 06:12:08 +0100 Subject: [PATCH] Fix bug for widget without model --- Widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Widget.php b/Widget.php index d0898ec..34289c9 100644 --- a/Widget.php +++ b/Widget.php @@ -281,7 +281,7 @@ public function run() 'selector' => $this->getSelector(), 'input' => $input, 'paramName' => $this->paramName, - 'value' => $this->model->{$this->attributeName}, + 'value' => $this->hasModel() ? $this->model->{$this->attributeName} : $this->value, 'preview' => $this->preview, 'crop' => $this->crop, 'browseGlyphicon' => $this->browseGlyphicon