Hello,

Originally Posted by
davestrand
And I keep getting this error every few Rows..
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/.cara/davestra/strandland.com/digitalstore/admin/includes/classes/sales_report.php</b> on line <b>908</b><br />
or this one...
<b>Warning</b>: array_multisort() [<a href='function.array-multisort?zenAdminID=4baf46482870f18dcf2411f16f568494'>function.array-multisort</a>]: Argument #1 is expected to be an array or a sort flag in <b>/home/.cara/davestra/strandland.com/digitalstore/admin/includes/classes/sales_report.php</b> on line <b>915</b><br />
or this one...
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/home/.cara/davestra/strandland.com/digitalstore/admin/includes/classes/sales_report.php</b> on line <b>908</b><br />
I had the same warnings and found a fix that works on my install. I submit it here in case it is usefull to Dave or others. BlindSide, please review the fix and include it in next release if appropriate.
In admin\includes\classes\sales_report.php around line 857, find :
PHP Code:
unset($dataset1, $dataset2);
foreach($timeframe['orders'] as $oID => $o_data) {
Add this line after the unset line:
PHP Code:
if (!is_array($timeframe['orders']) ) continue;
In the CSV output, I also had blank lines between different days with daily timeframe. Here is the fix:
In admin\includes\classes\sales_report.php around line 903, find:
PHP Code:
echo CSV_NEWLINE;
and comment it (or remove):
PHP Code:
//echo CSV_NEWLINE;
Bookmarks