From 8c49dabb1bd1bcb3151266277f62bcc8ef3c21d0 Mon Sep 17 00:00:00 2001 From: Thiago Talma Date: Thu, 30 Jan 2014 17:04:16 -0200 Subject: [PATCH] Change condition --- framework/grid/DataColumn.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/grid/DataColumn.php b/framework/grid/DataColumn.php index 4f710b4ff7..0f53359edb 100644 --- a/framework/grid/DataColumn.php +++ b/framework/grid/DataColumn.php @@ -141,10 +141,10 @@ class DataColumn extends Column protected function renderDataCellContent($model, $key, $index) { if ($this->value !== null) { - if ($this->value instanceof \Closure) { - $value = call_user_func($this->value, $model, $index, $this); - } else { + if (is_string($this->value)) { $value = ArrayHelper::getValue($model, $this->value); + } else { + $value = call_user_func($this->value, $model, $index, $this); } } elseif ($this->content === null && $this->attribute !== null) { $value = ArrayHelper::getValue($model, $this->attribute);