-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
with updated php(s), the string * float or string * int equations won't work.
You have to convert all strings like wind speed or temperature to a float or an int to get the conversions to work.
Otherwise it kicks out to a fatal error.
Change
$windspeed = round(2.23694 * $this->result['wind_speed']); // convert m/s to mi/h
to
$windspeed = round(2.23694 * (float)$this->result['wind_speed']); // convert m/s to mi/h
AND
return round($conversion_factor * $speed, 2);
to
return round((float)$conversion_factor * (float)$speed, 2);
and all other occurrences in the script to get the code to work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels