Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

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: 1570
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

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

Post by ConligWX »

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 - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
tmabell
Posts: 25
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 »

Try changing

$part = $metarParts[$metarPtr];

to this:

$part = $metarParts['$metarPtr'];
User avatar
ConligWX
Posts: 1570
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

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

Post by ConligWX »

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 - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
User avatar
ConligWX
Posts: 1570
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

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

Post by ConligWX »

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 - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
Post Reply