Skip to content

Commit

Permalink
fix: $query was undefined, now we use $data instead in csv method
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferran committed Feb 24, 2022
1 parent b66c319 commit 508f846
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fuel/modules/fuel/core/MY_Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -3023,8 +3023,8 @@ public function csv($data = NULL, $display_headers = TRUE, $delim = ",", $newlin
// check if it is a query object first
if (is_object($data) AND method_exists($data, 'list_fields'))
{
$headers = $query->list_fields();
$data = $query->result_array();
$headers = $data->list_fields();
$data = $data->result_array();
}

// then check to see if it is just a data array
Expand Down

0 comments on commit 508f846

Please sign in to comment.