From 8810450b8cf26e402a77a133fcb2b4d3f611ff47 Mon Sep 17 00:00:00 2001 From: Dale Davies Date: Fri, 10 Mar 2023 08:34:40 +0000 Subject: [PATCH] Trim elements from latlong array before querying OWM API --- jumpapp/classes/API/Weather.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jumpapp/classes/API/Weather.php b/jumpapp/classes/API/Weather.php index 315b03b..99995b5 100644 --- a/jumpapp/classes/API/Weather.php +++ b/jumpapp/classes/API/Weather.php @@ -39,8 +39,8 @@ class Weather extends AbstractAPI { // This is the API endpoint and params we are using for the query, $url = $owmapiurlbase .'?units=' . $units - .'&lat=' . $latlong[0] - .'&lon=' . $latlong[1] + .'&lat=' . trim($latlong[0]) + .'&lon=' . trim($latlong[1]) .'&appid=' . $this->config->get('owmapikey', false); // Use the cache to store/retrieve data, make an md5 hash of latlong so it is not possible