Trixology
WeatherCat => WeatherCat Web Templates => Topic started by: saratogaWX on January 19, 2022, 12:32:56 AM
-
I'd just gotten to install PHP8.1 and found some new Deprecated errata in the Base template set.
Mainly, the default casting of a float to an integer now gives a Deprecated message so things like $dir = $windlabel[ fmod((($winddir + 11) / 22.5),16) ]; had to change to $dir = $windlabel[ (integer)fmod((($winddir + 11) / 22.5),16) ]; to quiet the messages.
Also, the $minutes = intval(($sec / 60) % 60); was changed to $minutes = intval(fmod($sec / 60, 60));
In the GD library, the imagepolygon() and imagefilledpolygon() went from 4 arguments to 3 (losing the $num_args entry).
So.. I've been working on the Base-USA, CU-plugin site and will work on the Canada and World sites shortly.
I've updated the distributions with the following fixes:
Version 3.347 - 18-Jan-2022 (Base-*) PHP 8.1 updates to fix Deprecated errata: get-USNO-sunmoon.php V3.04, include-wxstatus.php V1.13, thermometer.php V1.18;
(Base-USA) advforecast2.php V5.18, NWS-regional-radar-animate.php V1.04, radar-status.php V1.18;
(CU-Plugin) PHP8.1 updates to fix Deprecated errata and add new CumulusMX data variables: CU-defs.php V1.12
Use the update tool (https://saratoga-weather.org/wxtemplates/updates.php#updates) with your Base and Plugin for 18-Jan-2022
I've attached a text file showing the main diffs of old/new files.
p.s. -- PHP 8.1 also announced the Deprecation of strftime()/strptime() built-in's ..the mesonet-map, global-map use that (and likely others too).
-
Thanks for your support for WeatherCat in your template.