From 09557ad962fc46ac19b859f5e629ab9165b3c157 Mon Sep 17 00:00:00 2001 From: Alexander Frolov Date: Mon, 26 Dec 2016 10:12:23 +0300 Subject: [PATCH] yii-way to get value of a model (#4) --- Jsoneditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jsoneditor.php b/Jsoneditor.php index 9de6eb1..3c50dee 100644 --- a/Jsoneditor.php +++ b/Jsoneditor.php @@ -27,7 +27,7 @@ public function init() $this->options['style'] = 'height: 250px;'; } if (is_object($this->model)) { - $this->value = $this->model->{$this->attribute}; + $this->value = Html::getAttributeValue($this->model, $this->attribute); $this->name = Html::getInputName($this->model, $this->attribute); } if (empty($this->value)) {