WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: weatheroz on January 30, 2023, 07:28:40 AM

Title: Leuven WXSIM scripts and PHP8
Post by: weatheroz on January 30, 2023, 07:28:40 AM
I'm trying to update to PHP8, and I'm getting this error when I load the page with this wsfct4 forecasting script.

Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /home/loganvil/public_html/wsfct4/wsIncWxsimPCreate.php:207 Stack trace: #0 /home/loganvil/public_html/wsfct4/wsIncWxsimPCreate.php(207): round('') #1 /home/loganvil/public_html/wsfct4/wsIncWxsimPHtml4.php(85): include_once('/home/loganvil/...') #2 /home/loganvil/public_html/wsfct4/wsFctWxsimDPage.php(270): include_once('/home/loganvil/...') #3 {main} thrown in /home/loganvil/public_html/wsfct4/wsIncWxsimPCreate.php on line 207

I'm hoping there is a simple fix to this, because this produces a very nice forecast on my site.
Title: Re: Leuven WXSIM scripts and PHP8
Post by: broadstairs on January 30, 2023, 07:36:26 AM
I replied on your other thread to this. The variable is the wrong type, it's string and should be integer or float. Try contacting the original author.

Stuart
Title: Re: Leuven WXSIM scripts and PHP8
Post by: weatheroz on January 30, 2023, 08:14:31 AM
I replied on your other thread to this. The variable is the wrong type, it's string and should be integer or float. Try contacting the original author.

Stuart

Thanks, I'm hoping he still visits here and has an answer or better yet a fix. :)
Title: Re: Leuven WXSIM scripts and PHP8
Post by: souldrifter798 on February 08, 2023, 07:30:33 AM
Does anyone have a link to download this script? I used to use it and would like to again but the version i have don't seem to work correctly anymore, think i broke it with editing somewhere along the line. Thanks.
Title: Re: Leuven WXSIM scripts and PHP8
Post by: broadstairs on February 08, 2023, 09:17:58 AM
Does https://www.weather-watch.com/smf/index.php/topic,73216.msg585900.html#msg585900 (https://www.weather-watch.com/smf/index.php/topic,73216.msg585900.html#msg585900) help?

Stuart
Title: Re: Leuven WXSIM scripts and PHP8
Post by: souldrifter798 on February 08, 2023, 11:07:01 AM
Does https://www.weather-watch.com/smf/index.php/topic,73216.msg585900.html#msg585900 (https://www.weather-watch.com/smf/index.php/topic,73216.msg585900.html#msg585900) help?

Stuart

Perfect thanks  [tup]