Trim elements from latlong array before querying OWM API

This commit is contained in:
Dale Davies
2023-03-10 08:34:40 +00:00
parent 040f3fe201
commit 8810450b8c

View File

@@ -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