Author Topic: Saratoga template check-fetch-times.php 1.56 Error  (Read 253 times)

0 Members and 1 Guest are viewing this topic.

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 211
Saratoga template check-fetch-times.php 1.56 Error
« on: March 16, 2024, 07:25:54 PM »
With the resent update to check-fetch-times.php to version 1.56 I'm getting the following error.

Code: [Select]
PHP Warning:  Undefined array key "SCRIPT_URI" in C:\inetpub\weathercat\check-fetch-times.php on line 1918
PHP Deprecated:  parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in C:\inetpub\weathercat\check-fetch-times.php on line 1918

If I make the change below the error will go away but I'm not sure if this is the best fix.

Before
$U = parse_url($_SERVER['SCRIPT_URI']);

After
$U = parse_url($_SERVER['SCRIPT_URI'] ?? '');

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga template check-fetch-times.php 1.56 Error
« Reply #1 on: March 16, 2024, 07:54:44 PM »
Fetch the update again.. I've updated the script (kept the same version number)
Sorry for the issue.. I'd discovered the same issue on another one of my servers and fixed the issue.
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 Forever

  • Senior Contributor
  • ****
  • Posts: 211
Re: Saratoga template check-fetch-times.php 1.56 Error
« Reply #2 on: March 16, 2024, 08:03:42 PM »
Thanks Ken, that fixed the issue.