From a090d526763cd2c74eb902fd895e48378e317699 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Thu, 30 Jan 2014 12:48:07 +0400 Subject: [PATCH] =?UTF-8?q?DIGITEC-222=20-=20=D0=90=D0=B2=D1=82=D0=BE?= =?UTF-8?q?=D1=84=D0=B8=D0=BB=D0=BB=D0=B8=D0=BD=D0=B3=D0=BE=D0=B2=D1=8B?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D1=8B?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=BB=D0=B6=D0=BD=D1=8B=20=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BF=D0=BE=D1=81=D1=82=D0=BE=D1=8F=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=B8=D0=B4=D0=B5=D0=BD=D1=82=D0=B8=D1=84=D0=B8?= =?UTF-8?q?=D0=BA=D0=B0=D1=82=D0=BE=D1=80=20=D0=98=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=20SqlCriteria=20?= =?UTF-8?q?=D0=B2=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=B5=20select?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/SqlCriteria.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/SqlCriteria.php b/model/SqlCriteria.php index 65b6f58..3c0649e 100644 --- a/model/SqlCriteria.php +++ b/model/SqlCriteria.php @@ -147,7 +147,10 @@ class SqlCriteria */ public function select($fields) { - $fields = array_map(function($item){return trim($item);},explode(',', $fields)); + if (!is_array($fields)) { + $fields = explode(',', $fields); + } + $fields = array_map(function($item){return trim($item);},$fields); $this->select = array_merge($this->select,$fields); return $this; }