From 0d0e4e3d064986237fc91eccdfb656d52bccabd0 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 24 Apr 2019 09:29:32 +0200 Subject: [PATCH] =?utf8?q?API=20response=20celsius=20and=20metric=20both?= =?utf8?q?=20mean=20to=20use=20=C2=B0C=20as=20unit=20for=20the=20temperatu?= =?utf8?q?re?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- curweather/curweather.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curweather/curweather.php b/curweather/curweather.php index 6d7edc06..4ede126b 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -62,7 +62,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti unset($_SESSION['curweather_notice_shown']); - if ((string) $res->temperature['unit'] === 'metric') { + if (in_array((string) $res->temperature['unit'], ['celsius', 'metric'])) { $tunit = '°C'; $wunit = 'm/s'; } else { -- 2.39.5