Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error On Warning: Invalid Argument Supplied For Foreach() In /data01/fyhlpro/public_html/store/admin/stats_manufacturers_sales.php On Line 210


warleb

Recommended Posts

Posted

I have just uploaded contribution Manufacturer Sales Report 2.2_1. I have done this before without any problems at all.

 

Now I get the error message when I click on the report

 

Warning: Invalid argument supplied for foreach() in /data01/fyhlpro/public_html/store/admin/stats_manufacturers_sales.php on line 210

 

Could this be something to do with register globals. Don't have a clue how to sort this out.

 

Code is below.

<td valign="top">

<?php if (empty($HTTP_GET_VARS['mID'])) { ?>

<!-- screen all manufacturer table -->

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

echo $manufacturerTotalsHeader;

foreach ($manufacturersStats as $manufacturersId => $stats) {

?>

<tr class="dataTableRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo tep_href_link(FILENAME_STATS_MANUFACTURERS, 'mID=' . $manufacturersId . "&start_date=$start_date&end_date=$end_date", 'NONSSL'); ?>'">

<td class="dataTableContent"><?php echo $stats[0]; ?></td>

<td class="dataTableContent" align="right"><?php echo $stats[1]; ?></td>

<td class="dataTableContent" align="right"><?php echo $stats[2]; ?> </td>

<td class="dataTableContent" align="right"><?php echo $stats[3]; ?> </td>

<td class="dataTableContent" align="right"><?php echo $stats[4]; ?> </td>

</tr>

<?php

}

?>

I don't bother doing backups. I love the thrill of screwing it all up!

Posted

It's Ok, sorted, once a database record had been added it worked fine.

I don't bother doing backups. I love the thrill of screwing it all up!

Posted
I have just uploaded contribution Manufacturer Sales Report 2.2_1. I have done this before without any problems at all.

 

Now I get the error message when I click on the report

 

Warning: Invalid argument supplied for foreach() in /data01/fyhlpro/public_html/store/admin/stats_manufacturers_sales.php on line 210

 

Could this be something to do with register globals. Don't have a clue how to sort this out.

 

[..]

 

This code expects a array, but probably the array is empty!

foreach ($manufacturersStats as $manufacturersId => $stats) {

 

Are there any stats to display? If you think so but still get this error try this on line above the code above:

echo '<pre>'; print_r($manufacturersStats); echo '</pre>';

 

Grtz,

 

Arjan Gelderblom

I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.

-- Stephen Hawking

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...