Closed (fixed)
Project:
Address Field
Version:
7.x-1.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2012 at 15:37 UTC
Updated:
15 May 2013 at 20:00 UTC
Using addressfield in conjunction with Drupal Commerce and experienced:
Notice: Undefined offset: 0 in _addressfield_render_address() (line 212 of ... addressfield.module).
| Comment | File | Size | Author |
|---|---|---|---|
| addressfield-undefined-offset.patch | 912 bytes | fluxsauce |
Comments
Comment #1
rszrama commentedI 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