Author Topic: Warning: non numeric value in wsMetarTxt.php Leuven template  (Read 384 times)

0 Members and 1 Guest are viewing this topic.

Offline wsNoordbergum

  • Contributor
  • ***
  • Posts: 135
    • wsNoordbergum
Warning: non numeric value in wsMetarTxt.php Leuven template
« 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
Davis Vantage Pro 2 UV/Solar
Meteobridge nano SD
Ecowitt WS90 WH40 WH31 WH57 GW2000 HP2550_c
CumulusMX/raspberry Pi 4b

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
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?
  • Then other users with the same problem can benefit also.
  • And you will benefit as I will find your question faster

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


Offline wsNoordbergum

  • Contributor
  • ***
  • Posts: 135
    • wsNoordbergum
Re: Warning: non numeric value in wsMetarTxt.php Leuven template
« Reply #2 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!
Davis Vantage Pro 2 UV/Solar
Meteobridge nano SD
Ecowitt WS90 WH40 WH31 WH57 GW2000 HP2550_c
CumulusMX/raspberry Pi 4b