Author Topic: Warning: Undefined array key "updated" Deprecated: strtotime(): Passing null t  (Read 515 times)

0 Members and 1 Guest are viewing this topic.

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 461
    • Penn Lake Weather
This just show up this afternoon on my web papge -- pennlake.us
Warning: Undefined array key "updated" in /home/hogan2/pennlake.us/advforecast2.php on line 654

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home/hogan2/pennlake.us/advforecast2.php on line 659

Any Idea's I believe I am running PHP 8.2.20

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9403
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Download a fresh copy from https://saratoga-weather.org/advforecast2.php?sce=view and install.. you don't have to configure it .. it will use your Settings.php to autoconfigure.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline yamiacaveman

  • Forecaster
  • *****
  • Posts: 461
    • Penn Lake Weather
Thanks Ken so far so good!!!!  No need to change your settings to mine? That's good news!!

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9403
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Generally, the support scripts with the Saratoga templates will autoconfigure if the entries in Settings.php are found.  Some wx...php pages may need settings entered there, but most of the support scripts can just be replaced as-is.
The check-fetch-times.php?show=versions includes recommendations for each script needing an update. 
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline zeppline

  • Senior Member
  • **
  • Posts: 74
    • Las Vegas Weather Guy
Thanks Ken
Everything working OK

Offline zeppline

  • Senior Member
  • **
  • Posts: 74
    • Las Vegas Weather Guy
I have a new warning this morning
Warning: Undefined array key "properties" in /home/lasvegaswx/www/www/advforecast2.php on line 2412

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9403
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
I think the problem is caused by misspecification of the Forecast zones in Settings.php
Quote
$SITE['NWSforecasts']   = array( // for the advforecast2.php V3.xx version script
// use "Zone|Location|Point-printableURL",  as entries .. first one will be the default forecast.
 "KLAS|Las Vegas, NV|https://forecast.weather.gov/MapClick.php?lat=36.17&lon=-115.13&unit=0&lg=english&FcstType=text&TextType=2",
"KVGT|North Las Vegas, NV|https://forecast.weather.gov/MapClick.php?lat=36.2121&lon=-115.194&unit=0&lg=english&FcstType=text&TextType=2",
"IEINV|Reno,NV|https://forecast.weather.gov/MapClick.php?lat=39.5296&lon=-119.8138&unit=0&lg=english&FcstType=textt&TextType=2",
"KIFP|Laughlin, NV|https://https://forecast.weather.gov/MapClick.php?lat=35.1678&lon=-114.573&unit=0&lg=english&FcstType=text&TextType=2",
"KORD|Bensenville, IL|https://forecast.weather.gov/MapClick.php?lat=41.960&lon=-87.9411&unit=0&lg=english&FcstType=text&TextType=2",
"KFEP|Shannon, IL|https://forecast.weather.gov/MapClick.php?lat=42.1547&lon=-89.7398&unit=0&lg=english&FcstType=text&TextType=2",
"KDKB|Hampshire, IL|https://forecast.weather.gov/MapClick.php?lat=42.1546&lon=-89.74&unit=0&lg=english&FcstType=text&TextType=2",
);
The first entry in each line appears to be a METAR site, not a NVZnnn Forecast Zone.
The first line should read
Quote
"NVZ020|Las Vegas, NV|https://forecast.weather.gov/MapClick.php?lat=36.17&lon=-115.13&unit=0&lg=english&FcstType=text&TextType=2",
for example.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline zeppline

  • Senior Member
  • **
  • Posts: 74
    • Las Vegas Weather Guy
Thanks again Ken It has been like that for about five years with no problems. I had a hard time finding the zone numbers, but I did find them and everything is working again.