After saving a node when leaving a geofield empty, this error occurs.

Notice: Undefined index: in geoPHP::load() (line 62 of /Users/jjpost/local_sites/drupal/sites/all/modules/contrib/geophp/geoPHP/geoPHP.inc).
Exception: geoPHP could not find an adapter of type in geoPHP::load() (line 65 of /Users/jjpost/local_sites/drupal/sites/all/modules/contrib/geophp/geoPHP/geoPHP.inc).

CommentFileSizeAuthor
#4 2292147-4.patch1.62 KBSpadXIII
#3 2292147-3.patch1.08 KBjjpost
#1 2292147-1.patch1.08 KBjjpost
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jjpost’s picture

Status: Active » Needs review
FileSize
1.08 KB

Attached a patch to fix the issue.

jjpost’s picture

Issue summary: View changes
jjpost’s picture

FileSize
1.08 KB

Updated the patch. $item['geom'] is not always an array.

SpadXIII’s picture

FileSize
1.62 KB

I updated patch in #3 and added my own patch to fix a similar issue with openlayers.

When saving a node and leaving the field empty, I can't edit the node anymore because of the geoPHP::load error. I fixed this in a similar way by ignoring empty item-values in the function openlayers_field_widget_form().

opdavies’s picture

Status: Needs review » Reviewed & tested by the community

I've tested the patch in #4. It applies cleanly to the module and fixes the issue.