Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

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

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
ConligWX
Posts: 736
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: MeteoBridge Nano SD
Location: Bangor, NI
Contact:

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

Post by ConligWX » Mon 05 Mar 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://twitter.com/conligwx
Davis Vantage Pro2 Plus - Meteobrige Nano SD + Saratoga/PWS Templates

tmabell
Posts: 17
Joined: Sat 07 Mar 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

Post by tmabell » Wed 07 Mar 2018 10:55 am

Try changing

$part = $metarParts[$metarPtr];

to this:

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

User avatar
ConligWX
Posts: 736
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: MeteoBridge Nano SD
Location: Bangor, NI
Contact:

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

Post by ConligWX » Wed 07 Mar 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://twitter.com/conligwx
Davis Vantage Pro2 Plus - Meteobrige Nano SD + Saratoga/PWS Templates

User avatar
ConligWX
Posts: 736
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: MeteoBridge Nano SD
Location: Bangor, NI
Contact:

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

Post by ConligWX » Wed 07 Mar 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://twitter.com/conligwx
Davis Vantage Pro2 Plus - Meteobrige Nano SD + Saratoga/PWS Templates

Post Reply