From c23725aca0fcef938cd2c9e505b1f8956880fd69 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sat, 24 Aug 2013 23:43:17 +0200 Subject: [PATCH] fix dataProvider getSort() correct creation of new Sort object if none is there --- framework/yii/data/DataProvider.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/framework/yii/data/DataProvider.php b/framework/yii/data/DataProvider.php index 5f36f7e..122e60a 100644 --- a/framework/yii/data/DataProvider.php +++ b/framework/yii/data/DataProvider.php @@ -80,10 +80,7 @@ abstract class DataProvider extends Component implements IDataProvider public function getSort() { if ($this->_sort === null) { - $this->_sort = new Sort; - if ($this->id !== null) { - $this->_sort->pageVar = $this->id . '-sort'; - } + $this->setSort(array()); } return $this->_sort; }