Unsupported operand types in system.module line 2134 when trying to add product with drupal commerce I'm trying to add a product to my commerce store, and anytime I navigate to the add a product page I get hit with the following error: 

Fatal error: Unsupported operand types in C:\Users\Nick\Sites\devdesktop\psr3\modules\system\system.module on line 2134


I have googles around, and this looks like a common error with contrib or custom modules.

The error happens in this if statement:

  if (!isset($item['mlid'])) {
    $item += db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = :path AND module = 'system'", array(':path' =&gt; $item['path']))-&gt;fetchAssoc();
  }


My php isn't good enough to know what might be causing the error. How can I solve this?
Either $item, or the return value from the db_query() statement, are resolving as something other than an array. Drupal is expecting them both to be arrays, so you get an error when it unconditionally tries to combine them.

It's not possible to debug something like this without access to the site; I'd recommend stepping through the code with a proper debugging tool to see exactly which side of the equation is failing. 

At a guess, I'd say $item is the problem. You'd expect to see more notices about undefined array indexes if it was simply that $item['path'] was missing or something like that.

One low-tech debugging approach is to temporarily disable custom/contrib modules one by one and see if you can find something responsible.