Closed (fixed)
Project:
ASIN Field
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2007 at 06:55 UTC
Updated:
24 Aug 2008 at 03:07 UTC
I receive the following error message when viewing an item listed using the ASIN module and amazontools 5.X-1.5 on Drupal 5.1.
warning: implode() [function.implode]: Bad arguments. in /home/freewave/public_html/worldmusicreview/modules/asin/asin.module on line 205.
The site in question is http://www.worldmusicreview.com and the error can be seen on the front page, one per item listed. I suspected that this was related to using a two-column theme, but the error happens with any theme I use. This is a recent install of Drupal and does not have any special customization.
Thank you,
Jason Champion
Comments
Comment #1
biohabit commentedIt appears that this line is the source of the problem, or at least the error goes away if I yank this.
$output .= '
by ' . implode(', ',$product->author) . '
';
Comment #2
eaton commentedThis is fixed in the latest dev snapshot -- I'll wait a bit and roll a new release (1.3) if it appears to solve your problem. thanks!
Comment #3
(not verified) commentedComment #4
misterlawrence commentedI reopened this issue, because I have upgraded to the latest dev (5.x-1.x-dev), ran update.php and still get the following error when I try to add a CD using the ASIN CCK field:
warning: implode() [function.implode]: Bad arguments. in /home/teameigw/public_html/sites/all/modules/asin/asin.module on line 205.Please advise. Thanks!
Comment #5
misterlawrence commentedMade active.
Comment #6
ekrispin commentedThe above indeed fixed the problem only for books (i.e. $product->author is an array of the authors of the book and therefore implode is needed).
In case of Music (Audio) and DVD, the problem is different: the $product->author field is NULL, by defintion, per Amazon (instead of author, for Audio/Music there is a field named Artist and for DVD/Video, there are the fields Actor and Director - but it seems that these are not transferred by the module according to a print_r of $product.
Therefore line 205 should be modified to the following:
With this fix, if the author field is NULL, the author line will not be printed.
Comment #7
eaton commentedFinally fixed in version 1.4. The 'real' solution -- including different fields for different media types -- will be part of the forthcoming amazon module for Drupal 6.
Comment #8
(not verified) commentedComment #9
Petuschki commentedunfortunately none of the two versions fixes the above mentioned error in my installation
I ran the update.php after installing the dev-version and still get the same error
warning: implode() [function.implode]: Bad arguments. in F:\webs\drupal\htdocs\drupal57\sites\all\modules\asin\asin.module on line 206.
Comment #10
lhtown commentedI get the same error:
implode() [function.implode]: Bad arguments. in /home/xxxxxxx/xxxxxxxx.com/sites/all/modules/asin/asin.module on line 206.
Comment #11
JaredAM commentedI'm having the same issue.
Comment #12
oadaeh commentedLook in http://drupal.org/node/195255, which is probably a duplicate of this issue, but it has the fix.
Comment #13
oadaeh commentedUse this one instead: http://drupal.org/node/182412