I assume this bug is due to an upgrade on our server to PHP 5.2.

When I click on "Checkout" I get the following error:

Catchable fatal error: Object of class stdClass could not be converted to string in /webdocs/test/public_html/includes/module.inc on line 181

Comments

neclimdul’s picture

Status: Active » Closed (fixed)

I don't think this exists anymore. Fixed elsewhere. Reopen if I am incorrect.

robomalo’s picture

Title: E-Commerce Shopping Cart Error from Upgrade to PHP 5.2?? » E-Commerce Shopping Cart Error
Status: Closed (fixed) » Active

It still happens. Here is what I have:

  • PHP Version 5.2.0
  • MySQL 4.1.11
  • Drupal 4.7.5
  • E-Commerce 4.7.x-2.1

The error happens when I go to my-url.com/cart/checkout.

If I change line 363 in cart.module from

if (in_array('registered_user', (array)module_invoke($item->ptype, $item, 'attributes', 'registered_user'))) {

to

if (in_array('registered_user', (array)module_invoke($item->ptype, 'productapi', $item, 'attributes', 'registered_user'))) {

the error goes away. Unfortunately, I do not know if this is fixing the error, or just breaking something completely.

deadmalc’s picture

I am getting the same error, it's not causing any problems that I can see at the moment, but if you don't need that
section of code (there is a comment on what it does above this) then comment it all out, that's the safest bet at the moment.
Unfortunately I've customised so much of the ecommerce stuff that it would be a nightmare to upgrade to the latest 4.7 version,
considering 5.x is out now and there is enough work there to do for me

gordon’s picture

Priority: Critical » Normal
Status: Active » Postponed

Actually this is because you have a poorly written product module which doesn't return any attributes when the attribute flag is called.

gordon’s picture

Version: 4.7.x-1.x-dev » 5.x-3.x-dev
Status: Postponed » Fixed

This has now been fix in 3-dev

Anonymous’s picture

Status: Fixed » Closed (fixed)
budda’s picture

Can you clarify how a poorly written product module should be fixed if the problem is with attributes.

I'd like to fix our product module which has started causing this issue.