I received the following errors when I tried to add ASIN# B000EVXKZM:

# warning: Invalid argument supplied for foreach() in /home/.doublestuff/luperry/luperry.com/modules/amazontools/amazon.php5.inc on line 112.
# warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/.doublestuff/luperry/luperry.com/modules/amazontools/amazon.php5.inc on line 211.

while it's fine with other items. This item should be valid, the product link is here: http://www.amazon.co.jp/exec/obidos/ASIN/B000EVXKZM/249-4138944-9372310

My locale is set to JP.

I'm not sure if it's a problem with Amazon or this module.

Comments

Prometheus6’s picture

Assigned: Unassigned » Prometheus6

Look around line 110 for the _amazon_editorialreviews_to_array() function. Make sure it looks like this:

  function _amazon_editorialreviews_to_array($Amazon_Item) {
    $EditorialReview = $Amazon_Item->childNodes;
    foreach ($EditorialReview->childNodes as $review_data) {
    	if ($review_data->nodeName == 'Content') {
    	  return array('editorialreview' => _amazon_element_content($review_data));
    	}
    }
  }
luperry’s picture

Yep, that's exactly what I have.

solipsist’s picture

I get the foreach error as well when using the "amazon item import" but it seems to work anyway except the terms don't get associated.

Prometheus6’s picture

I would explain the error but it's stupid.

Okay, it's become too easy for me to edit my sites remotely. I fixed this problem on my live sites and forgot to update CVS. You should be good now with a fresh download.

luperry’s picture

OK. the problem is gone.

thanks.

Prometheus6’s picture

Status: Active » Closed (fixed)