3 replies [Last post]
rolandk's picture
Offline
Joined: 02/06/2008
Juice: 240
Was this information Helpful?

I'm using Drupal 6.14 with Ubercart 2.x on PHP 5.3.1

I keep getting warning errors like this when I add items to my cart :

* warning: Parameter 1 to imageapi_gd_image_resize() expected to be a reference, value given in /home/cp2839/public_html/v6/modules/imageapi-6.x-1.6/imageapi/imageapi.module on line 165.
* warning: Parameter 2 to uc_attribute_cart_item() expected to be a reference, value given in /home/cp2839/public_html/v6/includes/module.inc on line 471.
* warning: Parameter 2 to uc_file_cart_item() expected to be a reference, value given in /home/cp2839/public_html/v6/includes/module.inc on line 471.
* warning: Parameter 2 to uc_attribute_cart_item() expected to be a reference, value given in /home/cp2839/public_html/v6/includes/module.inc on line 471.
* warning: Parameter 2 to uc_file_cart_item() expected to be a reference, value given in /home/cp2839/public_html/v6/includes/module.inc on line 471.

I have disabled the admin menu mod but these warnings still appear.

Any wisdom would be appreciated.

mahitha's picture
Offline
Administrator
Joined: 11/03/2009
Juice: -13506
Regarding the error in image api module

Try changing the Imageapi.module file in line 164 to ' array_unshift($params, &$image);'

function imageapi_toolkit_invoke($method, &$image, array $params = array()) {
  $function = $image->toolkit . '_image_' . $method;
  if (function_exists($function)) {
    array_unshift($params, &$image);
    return call_user_func_array($function, $params);
  }

For more details please review the link below:
http://drupal.org/node/540486

j1mb0b's picture
Offline
Joined: 03/15/2010
Juice: 4
This works!

The above worked for me, spent ages trying to find a resolution for displaying the product image in the catalog and product display section. all it required is '&' symbol to get it working!!!

Thanks mahitha!

sumeshpch's picture
Offline
Joined: 03/16/2011
Juice: 3
Re: Regarding the error in image api module

Thanks Mahitha, that worked fine...