• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dbutil->csv_from_result bug

#1
The code for the csv export has a bug concerning the trimming of the last delimiter on a line.

The code
PHP Code:
$out substr(rtrim($out), 0, -strlen($delim)).$newline
first trims the last character, and then also deletes the number of characters from the end of the string corresponding to the length of the delimiter. This deletes an extra character at the end of the line.

The correct code should be:
PHP Code:
$out substr($out0, -strlen($delim)).$newline
Reply

#2
https://github.com/bcit-ci/CodeIgniter/c...2627b3fe9c

Thanks for reporting this.
Reply

#3
No problem. Thanks for committing the change.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.