Hi there,

If you have a geocode-from-address geofield on a node with a file field, and you remove one of the items from the file field, you get this error. Bringing it to your attention.

Thanks!

Comments

noslokire’s picture

Same error and addressfield to geocoder setup, but I don't think has to do with the filefield, its a change to any field that triggers the error message.

Full message is:

Warning: Invalid argument supplied for foreach() in geocoder_widget_validate_walkthrough() (line 296 of /var/www/html/sites/all/modules/geocoder/geocoder.module).

adam_b’s picture

Same error and addressfield/geofield setup - I don't think it's a filefield issue either, but I've no idea what it is.

Notice: Uninitialized string offset: 0 in geocoder_widget_validate_walkthrough() (line 311 of C:\Users\Adam.Browne\Sites\wherechefseat2\sites\all\modules\geocoder\geocoder.module).

tecjam’s picture

Same error in line 311.

The error gets displayed if you upload an image (for every image) to the node node form as well as after submitting.

Notice: Uninitialized string offset: 0 in geocoder_widget_validate_walkthrough() (Line 311 von /home/www-data/sitename.com/sites/all/modules/geocoder/geocoder.module)

mikeytown2’s picture

Title: Uninitialized string offset: 0 in geocoder_widget_validate_walkthrough() (line 289 » Warning: Invalid argument supplied for foreach() in geocoder_widget_validate_walkthrough()
Status: Active » Needs review
StatusFileSize
new1.11 KB

line 318 of /var/www/html/sites/all/modules/geocoder/geocoder.module
Issue is this: http://stackoverflow.com/questions/8610636/is-this-a-php-bug

Patch below fixes it for us. Patch also contains a white space fix.

noslokire’s picture

Nice works for me

michaelfavia’s picture

Status: Needs review » Closed (fixed)

White space handled in another issue. Patch rerolled and applied. Thank you for the work especially mikeytown for the patch.

http://drupalcode.org/project/geocoder.git/commit/f9268d3