yiisoft/yii — pull request #1534 by Yiivgeny (2012-10-04 15:41:13+00:00)
Title: Fixed can sorting cutted array with CArrayDataProvider

Sample code
```php
$testArray = array(
array('id' => 1, 'field1' => 'value1', 'field2' => 'value2'),
array('id' => 2, 'field1' => 'value3'),
);

$dataProvider = new CArrayDataProvider($testArray,array(
'sort' => array(
'attributes' => array('id', 'field1', 'field2')
)
));

$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $dataProvider,
'columns' => array('field1', 'field2')
));
```
Initial rendered correctly, but sort this grid by `field2` thrown exception `Undefined index: field2` on `framework/web/CArrayDataProvider.php(160)`