Warning: Parameter 1 to amazon_store_addcart_form() expected to be a reference, value given in drupal_retrieve_form() (line 771 of /home/ysadmin/public_html/includes/form.inc).

I am getting error and other similar ones like above with a fresh install of DP7 and Amazon Store. I am including a screenshot to show the other errors.

CommentFileSizeAuthor
#3 amazon_store_byreference.patch2.16 KBpancho
#2 error.jpg220.38 KBkrymp

Comments

rfay’s picture

Title: amazon_store_addcart_form() » Warning: Parameter 1 to amazon_store_addcart_form() expected to be a reference

Didn't get the screenshot, would appreciate it. Also, please say exactly what action you took to get this message, and it would also help to know what other modules are installed.

krymp’s picture

StatusFileSize
new220.38 KB

Sorry forgot to press the attach button. I get this in everyone of my Amazon Store pages. I also get it on my Item Detail page by using the default Amazon Panels template - http://yousketch.net/amazon_store/item/0596515804.

I have a few modules, Panels, Views, Media, Youtube-Media, StarRating and Styles

pancho’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new2.16 KB

If you can't reproduce this error, this might have something to do with PHP 5.3.
I actually don't have a PHP 5.2 server running, however with PHP 5.3 I get the same errors.

Removing the ampersand from the first argument in the signature of the various forms helps here. The errors are gone and everything works just fine. Patch enclosed.

krymp’s picture

Thank you!!! This patch worked for me.

pancho’s picture

rfay’s picture

Status: Needs review » Reviewed & tested by the community

I was just on crack when I updated those.

pancho’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Tafa’s picture

not sure if this has been causing trouble to others but i found that installed the variable module solved the problem almost immediately. Just en passant..
T

Tafa’s picture

okay, not working actually...opening a new issue to keep things separate...