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
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | implode-error.patch | 1.29 KB | oadaeh |
| #2 | asin.patch | 981 bytes | chellman |
Comments
Comment #1
znorris commentedThanks 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.
Comment #2
chellman commentedThis seems to work for me as well. I'm including a patch for it.
Comment #3
misterlawrence commentedI just want to add my thanks to Drew also. This was driving me crazy!
-David
Comment #4
oadaeh commentedChanging the name to make the issue easier to locate.
Comment #5
oadaeh commentedI 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.
Comment #6
khan2ims commentedHi,
The changes suggested by Drew worked fro me. Thanks!!
Imran Khan
Project Manager
New Earth Marketing