7 replies [Last post]
gafir777's picture
Offline
Joined: 03/05/2009
Juice: 104

Hi,

I'm getting the following error when I click on the add to cart button:
Fatal error: Unsupported operand types in /home/servers/new.philadelphiastories.org/pages/includes/common.inc on line 1376

Where could it come from?

Thanks,

gafir777's picture
Offline
Joined: 03/05/2009
Juice: 104
Re: Add to cart error

Important fact I forgot to mention:

I only get this error when trying to add to cart as an anonymous user. If i'm logged in, it works fine and the product is added to the cart.

gafir777's picture
Offline
Joined: 03/05/2009
Juice: 104
Re: Re: Add to cart error

I found out the error may be related to the fact some variables may not be numeric while they are expected to be. I have no idea, however, how this relates to the "Add to Cart" button when clicked as an anonymous user.

gafir777's picture
Offline
Joined: 03/05/2009
Juice: 104
Re: Re: Re: Add to cart error

Just found the following post with the same error: http://drupal.org/node/358327
I don't see why my error would be related to the auction part of the module though. I'll try to change it though.

gafir777's picture
Offline
Joined: 03/05/2009
Juice: 104
Re: Re: Re: Re: Add to cart error

I have tried to upgrade to the version 2 beta 5 (was beta 3 before) and I get the same problem. I just get a fatal error, but if I just reload the website after that, I can see my product added to the cart. Any ideas?

Thanks,

gafir777's picture
Offline
Joined: 03/05/2009
Juice: 104
Re: Re: Re: Re: Re: Add to cart error

common.inc line 1376 corresponds to the end of $options array:

function url($path = NULL, $options = array()) {
  // Merge in defaults.
  $options += array(
    'fragment' => '',
    'query' => '',
    'absolute' => FALSE,
    'alias' => FALSE,
    'prefix' => ''
  );

Not sure what conclusion to draw from this.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6841
Re: Re: Re: Re: Re: Re: Add to cart error

What's your version of PHP?

Try to install Devel and turn on the backtrace settings. That should tell us what function in Ubercart is using url() badly.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15422
Re: Re: Re: Re: Re: Re: Re: Add to cart error

Can you uninstall your contribs to make sure this is even a problem w/ UC core? For example, I notice you're using the Ajax Cart contrib, and I can't debug that for you if that's where the problem lies.