diff --git a/oc-includes/osclass/classes/datatables/DataTable.php b/oc-includes/osclass/classes/datatables/DataTable.php index 150bdaca4c..9983cc58da 100644 --- a/oc-includes/osclass/classes/datatables/DataTable.php +++ b/oc-includes/osclass/classes/datatables/DataTable.php @@ -121,11 +121,12 @@ public function sortedColumns() public function sortedRows() { $rows = array(); - $columns = $this->sortedColumns(); - if(count($this->aRows)===0) { + $aRows = (array) $this->aRows; + $columns = (array) $this->sortedColumns(); + if(count($aRows)===0) { return $rows; } - foreach($this->aRows as $row) { + foreach($aRows as $row) { $aux_row = array(); foreach($columns as $k => $v) { if(isset($row[$k])) { @@ -160,4 +161,4 @@ public function rawRows() } -?> \ No newline at end of file +?>