Author Topic: Error Log  (Read 825 times)

0 Members and 1 Guest are viewing this topic.

Offline KapitainOne

  • Senior Contributor
  • ****
  • Posts: 260
    • Sanford Weather
Error Log
« on: March 14, 2025, 12:32:43 PM »
I'm seeing hundreds of entries like the following in my error log is there anything I can do to eliminate?
[14-Mar-2025 11:09:32 America/Winnipeg] PHP Warning: Undefined variable $VPuv in
home/sanfordw/public_html/Sar/ajax-gizmo.php on line 207
[14-Mar-2025 11:09:32 America/Winnipeg] PHP Warning: Undefined variable $VPuv in
home/sanfordw/public_html/Sar/ajax-gizmo.php on line 209
[14-Mar-2025 11:09:32 America/Winnipeg] PHP Deprecated: strpos(): Passing null to
parameter #1 ($haystack) of type string is deprecated in /home/sanfordw/public_html/Sar
ajax-gizmo.php on line 282

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Log
« Reply #1 on: March 14, 2025, 01:24:05 PM »
I'm not sure why your installation is showing those errata, but it's an easy fix:

Change ./Sar/ajax-gizmo.php from
Quote
    <span class="ajaxcontent8" style="display: none"><?php langtrans('UV Index'); ?>:
           <span class="ajax" id="gizmouv"><?php echo $VPuv; ?></span>&nbsp;
       <span style="color: #ffffff">
           <span class="ajax" id="gizmouvword"><?php echo gizmo_get_UVrange($VPuv); ?></span>
       </span>
    </span>
to
Quote
<?php if(isset($VPuv)) { ?>
    <span class="ajaxcontent8" style="display: none"><?php langtrans('UV Index'); ?>:
           <span class="ajax" id="gizmouv"><?php echo $VPuv; ?></span>&nbsp;
       <span style="color: #ffffff">
           <span class="ajax" id="gizmouvword"><?php echo gizmo_get_UVrange($VPuv); ?></span>
       </span>
    </span>
<?php } // end of VPuv check ?>
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 KapitainOne

  • Senior Contributor
  • ****
  • Posts: 260
    • Sanford Weather
Re: Error Log
« Reply #2 on: March 14, 2025, 02:17:46 PM »
Thanks Ken I'll monitor for a couple hours to confirm it's fixedBill

 

anything