Hi, please help me,
unfortunately sometimes the Saratoga template of my site at the address: https://meteogm.altervista.org/mb/wxindex.php is not readable, it does not work, and the following error appears:
Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /membri/meteogm/mb/MB-defs.php:63 Stack trace: #0 /membri/meteogm/mb/MB-defs.php(63): round('--', 0) #1 /membri/meteogm/mb/MBtags.php(729): include_once('/membri/meteogm...') #2 /membri/meteogm/mb/top.php(81): include_once('/membri/meteogm...') #3 /membri/meteogm/mb/wxindex.php(38): include('/membri/meteogm...') #4 {main} thrown in /membri/meteogm/mb/MB-defs.php on line 63
can you tell me why and tell me what I should do to always display it? Thanks for the reply.
My Saratoga template sometimes doesn't work
Moderator: Mattk
Re: My Saratoga template sometimes doesn't work
Line 63 in mb/MB-defs.php now reads
As you can see in the error message $windch contents is '--'
The $windch item is set in line 61 which reads
Change that line 61 to
That way a '--' "value" is replaced with 0
These problems can occur when your Metobridge is not receiving the outside weather=station data
The missing values are placed with '--' values by default.
Code: Select all
$windchnodp = round($windch,0); // calculated value Code: Select all
#0 /membri/meteogm/mb/MB-defs.php(63): round('--', 0)Code: Select all
$windch = $WX['wind0chill-act'];Code: Select all
$windch = (float) $WX['wind0chill-act'];These problems can occur when your Metobridge is not receiving the outside weather=station data
The missing values are placed with '--' values by default.

