In a Kickstart 2 installation, I got an error reading:

Warning: unserialize() expects parameter 1 to be string, array given in commerce_price_table_field_load() (line 171 of /.../htdocs/sites/all/modules/commerce_price_table/commerce_price_table.module).

because the object has been unserialized already.

The attached patch adds an extra is_array() check.

Members fund testing for the Drupal project. Drupal Association Learn more


Cybso’s picture

Same problem reported in

Cybso’s picture

(duplicate post - sorry)

pcambra’s picture

Shouldn't this be part of #1823012: Add IEF integration?

c.altosax’s picture

We use IEF on our site, and just installed the price table module yesterday. And, like you, we received this unserialize error. I do not understand completely what the error means, or if it is likely to cause problems down the road. Do you more experienced guys out there know whether it is safe to just ignore this error for now, until the maintainer updates his module?

Cybso’s picture

Apart from this bug Commerce Price Table works fine with IEF. The other ticket is about hiding the default price field and integrating the price table into the IEF summary table. So I would consider this as a separate bug.

I reviewed my patch, and noticed a problem: If '$items[$id][$delta]['data']' is an array, it would be emptied, because PHP would jump into the "else" condition. Problem fixed in the attached patch. Also, changed check from "!is_array(...)" into "is_string(...)".

pcambra’s picture

Status: Needs review » Fixed

--- ../commerce_price_table-1.1/commerce_price_table.module

Please provide patches from the module root, otherwise is more complicated to apply.

Commited, thanks!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

used wrong word

ecvandenberg’s picture

Issue summary: View changes

I guess this bug still lives in commerce_price_table-7.x-1.1. At my site I now receive the warning as stated in

When will this be involved in a stable release?

DrCord’s picture

patch worked for me on the latest commerce price table module version.