From c03984a0ce21e2e40ac3f2d4efc940c9cdc94259 Mon Sep 17 00:00:00 2001 From: FredrikGeers Date: Wed, 4 Sep 2019 14:26:58 +0200 Subject: [PATCH] Updated PHP 7.2+ error --- fields/field.maplocation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fields/field.maplocation.php b/fields/field.maplocation.php index c772356..893d5a3 100644 --- a/fields/field.maplocation.php +++ b/fields/field.maplocation.php @@ -233,7 +233,7 @@ public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = fa )); $field->appendChild($map); - if (count($this->_filter_origin['latitude']) > 0) { + if (is_object($this->_filter_origin['latitude']) && count($this->_filter_origin['latitude']) > 0) { $distance = new XMLElement('distance'); $distance->setAttribute('from', $this->_filter_origin['latitude'] . ',' . $this->_filter_origin['longitude']); $distance->setAttribute('distance', extension_maplocationfield::geoDistance($this->_filter_origin['latitude'], $this->_filter_origin['longitude'], $data['latitude'], $data['longitude'], $this->_filter_origin['unit']));