Using addressfield in conjunction with Drupal Commerce and experienced:

Notice: Undefined offset: 0 in _addressfield_render_address() (line 212 of ... addressfield.module).
CommentFileSizeAuthor
addressfield-undefined-offset.patch912 bytesFluxSauce
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Status: Needs review » Fixed

I can't reproduce your issue, but judging by the error message and line affected, all I can figured is that somehow your site was calling addressfield_render_address() with an invalid $format array. There's no reason 0 should have been a child key that I can see. However, in order to prevent this error in the future, I've simply changed the in_array() check at the top of _addressfield_render_address() to use strict comparison mode. In that mode, 0 will never evaluate to TRUE for the given condition statement whereas it would match any of the strings otherwise.

Commit: http://drupalcode.org/project/addressfield.git/commitdiff/5fff558

Status: Fixed » Closed (fixed)

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