With the version alpha3, when I try to edit the node or add a new one, the site broke and it show the error in this issue title

when I go back and refresh, I get this error:

Notice: Undefined variable: options in _addressfield_country_options_list() (line 800 in /var/www/plugger/sites/all/modules/addressfield/addressfield.module).
Warning: array_intersect_key() [function.array-intersect-key]: Argument #1 is not an array in _addressfield_country_options_list() (line 800 in addressfield/addressfield.module).

My drupal is configured to portuguese br, might it be a bug with alpha 3 and the br form include?

Comments

afeijo’s picture

the $options array is missing

Damien Tournoud’s picture

Status: Active » Fixed

I broke that during refactoring. Sorry about that. Fixed in alpha4.

afeijo’s picture

Status: Fixed » Closed (fixed)

confirmed, alpha4 is ok

AdamGerthel’s picture

I'm getting this error as well, but it doesn't mention anything about this module (unlike the error message the initial poster got). I'm simply getting this:

Fatal error: Unsupported operand types in path-to-drupal-site/includes/form.inc on line 2500

I'm using Commerce module which requires this module. The error appears when editing or adding new product entities.

Edit: I'm using alpha4

priyankasawant’s picture

You can use #
like
if (is_array($form['attributes'][$key])){
$form['attributes'][$key] += array(
'display_label' => p_commerce_get_display_label($key),
);
}
replace display_label with #display_label. Solved my issue.