From: Tobias Diekershoff Date: Wed, 24 Apr 2019 07:29:32 +0000 (+0200) Subject: API response celsius and metric both mean to use °C as unit for the temperature X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0d0e4e3d064986237fc91eccdfb656d52bccabd0;p=friendica-addons.git API response celsius and metric both mean to use °C as unit for the temperature --- 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 {