ASIN doesn't display author gives Bad arguments with function.implode

robbt - November 26, 2007 - 00:13
Project:ASIN Field
Version:5.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

warning: implode() [function.implode]: Bad arguments. in /home/www/drupal-5.3/sites/all/modules/asin/asin.module on line 206.

#1

robbt - November 26, 2007 - 00:30

I noticed that this worked with the Amazon Nodes content type, but it doesn't work for just adding the ASIN field to a content type and typing in the isbn. It will show the image and the price but it doesn't show the author, but displays this error.

#2

jo1ene - November 27, 2007 - 01:17

I am also having this problem. I didn't when I first installed and started using the module, but I appear to have it now. I will try to track this down.

#3

curtisc@drupal.org - December 16, 2007 - 10:33

The problem is because the implode function in theme_asin_field is using the wrong variable. The code right now says the following:

implode(', ', $asin->author)

But that should really be this:

implode(', ', $product->author)

There is no $asin variable in this function and it looks like the latest commit broke this. I've attached a patch to fix it.

AttachmentSize
fix_implode.patch903 bytes

#4

DonCoryon - March 15, 2008 - 17:51

This patch work perfectly. Thank you curtisc.

#5

conniec - March 28, 2008 - 17:51

Many thanks curtisc! You've made my day!

Connie

 
 

Drupal is a registered trademark of Dries Buytaert.