WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: wsNoordbergum on August 23, 2021, 04:08:09 PM

Title: Warning: non numeric value in wsMetarTxt.php Leuven template
Post by: wsNoordbergum on August 23, 2021, 04:08:09 PM
Now and then I get a warning that a non numeric value is encountered in wsMetarTxt.php on line 609
I think it has to do with cloud height not being interpreted as it should
Is there a solution?

www.wsnoordbergum.nl
Title: Re: Warning: non numeric value in wsMetarTxt.php Leuven template ** Solved **
Post by: wvdkuil on August 26, 2021, 05:51:43 AM
Now and then I get a warning that a non numeric value is encountered in wsMetarTxt.php on line 609
I think it has to do with cloud height not being interpreted as it should
Is there a solution?

www.wsnoordbergum.nl

Support inks to Leuven scripts and Template => https://support.leuven-template.eu/

Could you please use the correct topics to post questions about Leuven scripts?
Error in wsMetarTxt.php on line 609
You are using an old 2.8j-version of the script.
Latest 2.8x2-version solved that error in 2018-05-06,  in that version it is line 622.

Change your line 209 from
Code: [Select]
                $result['max-icon']     = $result['max-icon'] + $max_cloud;
to
Code: [Select]
                $result['max-icon']     = (int) $result['max-icon'] +  (int)$max_cloud;
Wim

Title: Re: Warning: non numeric value in wsMetarTxt.php Leuven template
Post by: wsNoordbergum on August 26, 2021, 09:43:25 AM
I got a warning that there was no post for over 5 months in the topic I wanted to post in.
Anyway, thank you for the support!