Fatal error: Cannot use string offset as an array in mysite/public_html/sites/all/modules/ubercart-6.x-2.0-rc3/ubercart/uc_cart/uc_cart.pages.inc on line 447

i changed it to mysite for privacy...but thats the error returned after reviewing and submitting order

Comments

phelix’s picture

I am getting very close to the same error.

Fatal error: Cannot use string offset as an array in /www/drupal/sites/mywebsite.com/modules/ubercart/uc_cart/uc_cart.pages.inc on line 413

rukusgetdown’s picture

hmmm very odd...i looked at the code and do not see anything that shouldnt be there?

castellan’s picture

I'm getting the same error:

Fatal error: Cannot use string offset as an array in /path/to/drupal/sites/all/modules/ubercart/uc_cart/uc_cart.pages.inc on line 447

PHP version 5.2.6 on Linux

rukusgetdown’s picture

i changed the code..i will post it in a minute

rszrama’s picture

Status: Active » Fixed

This was a stupid mistake on my part. I've committed the fix, but basically you have to change this line:

  if ($op = 'cart-details') {

To use the proper comparison operator:

  if ($op == 'cart-details') {

This should be the first line in the function uc_payment_method_free_order().

Thanks for the bug report!

Status: Fixed » Closed (fixed)

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