I get these notices
Notice: Undefined index: lat in geofield_field_formatter_view()
Notice: Undefined index: lon in geofield_field_formatter_view()
I've rewritten the switch code block and moved the foreach loop outside of it. I find the code easier to read as a result.
To fix the notices I make sure the lat/lon is not empty in the item.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | geofield-1512944-4-remove-empty-items.patch | 558 bytes | mikeytown2 |
| #2 | geofield-1512944-2-rework-switch-7.x-2.x.patch | 10.59 KB | mikeytown2 |
| #1 | geofield-1512944-1-rework-switch.patch | 11.83 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 commentedpatch also fixes various white space issues.
Comment #2
mikeytown2 commentedsame patch for 7.x-2.x
Comment #3
noslokire commentedLooks good to me
Comment #4
mikeytown2 commentedA simpler way to achieve the same thing.