Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

PHP Notice: Undefined offset: 11 in get-metar-conditions-inc.php

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
Toxic17
Posts: 741
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis VPro2 Plus
Operating System: Deb 9.4 Stretch
Location: Bangor, NI
Contact:

PHP Notice: Undefined offset: 11 in get-metar-conditions-inc.php

Postby Toxic17 » Mon Mar 05, 2018 8:27 am

Ken

just had this notice in apache logs when visiting the wxmetar.php on my site:

Code: Select all

[Sun Mar 04 23:54:31.517313 2018] [php7:notice] [pid 21322:tid 140681158805248] [client xx.xxx.xx.6:49533] PHP Notice:  Undefined offset: 11 in /htdocs/weather/get-metar-conditions-inc.php on line 752


when i looked at the line 752 it shows:

Code: Select all

      $part = $metarParts[$metarPtr];


Any help in this would be most greatful.

I'm thinking it maybe something to do with the data coming back from the airports perhaps?
Regards Simon

https://www.conligwx.org
https://www.conligwx.org/pws/
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

tmabell
Posts: 10
Joined: Sat Mar 07, 2015 12:25 am
Weather Station: Vantage Pro II
Operating System: Windows 7
Location: Indiana

Re: PHP Notice: Undefined offset: 11 in get-metar-conditions-inc.php

Postby tmabell » Wed Mar 07, 2018 10:55 am

Try changing

$part = $metarParts[$metarPtr];

to this:

$part = $metarParts['$metarPtr'];

User avatar
Toxic17
Posts: 741
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis VPro2 Plus
Operating System: Deb 9.4 Stretch
Location: Bangor, NI
Contact:

Re: PHP Notice: Undefined offset: 11 in get-metar-conditions-inc.php

Postby Toxic17 » Wed Mar 07, 2018 1:19 pm

Thanks I'll give it a go, I've not had the error since, but no doubt it will crop up again soon. I'll make the changes and check the logs again in a few days time.
Regards Simon

https://www.conligwx.org
https://www.conligwx.org/pws/
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

User avatar
Toxic17
Posts: 741
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis VPro2 Plus
Operating System: Deb 9.4 Stretch
Location: Bangor, NI
Contact:

Re: PHP Notice: Undefined offset: 11 in get-metar-conditions-inc.php

Postby Toxic17 » Wed Mar 07, 2018 2:29 pm

I tried that, but all the data disappears.

meter_test.JPG


Thanks for the suggestion however even when the error appears in the apache log, the end result on the wxmetar.php page is fine so its not that bad an issue.
You do not have the required permissions to view the files attached to this post.
Regards Simon

https://www.conligwx.org
https://www.conligwx.org/pws/
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 2 guests