From 6cd1dbd8967de2a2c86ec1afa35176e098ab2282 Mon Sep 17 00:00:00 2001 From: indigoxela Date: Tue, 17 Mar 2026 09:40:42 +0100 Subject: [PATCH] Issue #78: Make sure the string to geocode is not just space --- views/proximity_plugins/geofieldProximityGeocoder.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/views/proximity_plugins/geofieldProximityGeocoder.inc b/views/proximity_plugins/geofieldProximityGeocoder.inc index 517c39b..3bf164e 100644 --- a/views/proximity_plugins/geofieldProximityGeocoder.inc +++ b/views/proximity_plugins/geofieldProximityGeocoder.inc @@ -56,7 +56,11 @@ class geofieldProximityGeocoder extends geofieldProximityBase implements geofiel $geocoder_engine = $views_plugin->options['geofield_proximity_geocoder_engine']; $location = (isset($views_plugin->value)) ? $views_plugin->value['origin'] : $views_plugin->options['geofield_proximity_geocoder']; // Make sure it's a string to prevent problem with faulty data from GET. - if ($location && is_string($location)) { + if (!is_string($location)) { + return FALSE; + } + $location = trim($location); + if (strlen($location)) { $geocoded_data_raw = geocoder($geocoder_engine, $location); if ($geocoded_data_raw) {