diff --git a/CHANGELOG b/CHANGELOG index c19102cf5..137a609e9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ Version 1.1.5 to be released - Bug #1577: Fixed the bug in CMssqlSchema::compareTableNames() (Qiang) - Bug #1592: Fixed the bug that the hidden field generated by CHtml::checkBox may have the same ID as the checkbox. (Qiang) - Bug #1615: Fixed the bug that caused CLogFilter::filter() to add context informations when the log was empty (Y!!) +- Bug #1653: Fixed the bug that in PHP 5.3 CArrayDataProvider will fail due to incorrect parameters sent to array_multisort (Qiang) - Bug #1673: Fixed the bug that CDbSchema::getTables() might return null table schemas (Qiang) - Bug #1696: Fixed the bug that CJSON and CJavaScript might serialize float numbers into local-dependent strings (Qiang) - Bug #1715: Fixed the bug that CActiveDataProvider.sort does not respect table alias set in the query criteria (Qiang) diff --git a/framework/web/CArrayDataProvider.php b/framework/web/CArrayDataProvider.php index 65a76a35a..af45f5bdd 100644 --- a/framework/web/CArrayDataProvider.php +++ b/framework/web/CArrayDataProvider.php @@ -110,13 +110,19 @@ class CArrayDataProvider extends CDataProvider if(empty($directions)) return; $args=array(); + $dummy=array(); foreach($directions as $name=>$descending) { $column=array(); foreach($this->rawData as $index=>$data) $column[$index]=is_object($data) ? $data->$name : $data[$name]; - $args[]=$column; - $args[]=$descending ? SORT_DESC : SORT_ASC; + $args[]=&$column; + $dummy[]=&$column; + unset($column); + $direction=$descending ? SORT_DESC : SORT_ASC; + $args[]=&$direction; + $dummy[]=&$direction; + unset($direction); } $args[]=&$this->rawData; call_user_func_array('array_multisort', $args);