I believe the fix discussed in Error in asin.module on line 205 (http://drupal.org/node/126436) inadvertently introduced another issue. Since updating to 1.4, ASIN has been throwing an implode error:

warning: implode() [function.implode]: Bad arguments. in PATH/asin.module on line 206.

After reviewing the 1.4 changes and the above issue, it looks to me like the object name was switched mid-line from $product to $asin. In 1.4, lines 205 - 208 read thus:

      if (!empty($product->author)) {
        $output .= '<p class="asin-author">by '. is_array($product->author) ? check_plain(implode(', ', $asin->author)) : check_plain($asin->author) .'</p>';
      }

Those $asin->author calls are the trouble. I believe they should read $product->author.

      if (!empty($product->author)) {
        $output .= '<p class="asin-author">by '. is_array($product->author) ? check_plain(implode(', ', $product->author)) : check_plain($product->author) .'</p>';
      }

That change is resolving the problem in our environment.
Drew

CommentFileSizeAuthor
#5 implode-error.patch1.29 KBoadaeh
#2 asin.patch981 byteschellman

Comments

znorris’s picture

Thanks for the resolution Drew.

Having the same problem my first step was to switch to the development version but i still had the same problem. After making the two corrections Drew suggests everything works fine.

chellman’s picture

StatusFileSize
new981 bytes

This seems to work for me as well. I'm including a patch for it.

misterlawrence’s picture

I just want to add my thanks to Drew also. This was driving me crazy!

-David

oadaeh’s picture

Title: ASIN 1.4: use of $asin->author vs. $product->author » warning: implode() [function.implode]: Bad arguments. in asin.module on line 206.

Changing the name to make the issue easier to locate.

oadaeh’s picture

Version: 5.x-1.4 » 5.x-1.x-dev
StatusFileSize
new1.29 KB

I didn't test it before, but chellman's attached patch doesn't work correctly when the path is different. I've attached a patch that should. I created it against 5.x-1.x-dev, but it applies cleanly to 5.x-1.4.

khan2ims’s picture

Hi,

The changes suggested by Drew worked fro me. Thanks!!

Imran Khan
Project Manager
New Earth Marketing