Author Topic: wxriverpage etc  (Read 9246 times)

0 Members and 1 Guest are viewing this topic.

Offline tigerbait

  • Senior Member
  • **
  • Posts: 55
    • Ellerbe Weather
Re: wxriverpage etc
« Reply #50 on: July 30, 2024, 09:06:11 PM »
Thanks Ken in advance. Hope this helps.
Alan
https://www.sporttiger.com
Davis VP2 Weather Display
Saratoga scripts

Offline kplew

  • Member
  • *
  • Posts: 36
    • Plew Farm Weather
Re: wxriverpage etc
« Reply #51 on: March 17, 2025, 07:12:36 PM »
I'm using the 4.01 script and getting the following error on the river detail page:
Deprecated: number_format(): Passing null to parameter #1 ($num) of type float is deprecated in /home1/kevinplew/public_html/weather/wxriverdetail.php on line 357
bgcolor="#FF0000"> 4.11 kcfs

Any help would be appreciated.

Thanks

Offline tedroche

  • Semi-retired, novice weather station operator
  • Member
  • *
  • Posts: 45
  • Weather Observer, CoCoRaHS, Storm Spotter
    • Contoocook Village North
Re: wxriverpage etc
« Reply #52 on: March 19, 2025, 01:33:26 PM »
I've found a couple of glitches in the 4.01 script as I have it running at https://contoocook.org/wxriverpage.php. These work for me, with the funky files I get from my quirky river feeds. Your mileage may vary, make backups!

The status always displays "Record Flooding" if the river record retrieved has no record stage. The fix is to change lines 270-271 from:
Code: [Select]
270     $record = 'N/A';
271     $frecord = 'N/A';
to:
Code: [Select]
270     $record = '';
271     $frecord = '';

Once that's fixed, the display changes to "Minor Flooding," although it should be "Near Flood Stage" Change the lines 252-253 from:
Code: [Select]
252   $flood = $TV['stage']['action'];
253   $fflood = $TV['flow']['action'];
to:
Code: [Select]
252   $flood = $TV['stage']['minor'];
253   $fflood = $TV['flow']['minor'];

If you choose to try this update yourself, change the text, but don't add the line numbers, they're just there for reference.

Stay dry!
Ecowitt GW1100 HP3501 WH32 WN32 WH31 WN34S WH41 WH40 WS68 RaspPi
Website, CWOP: GW0103, CoCoRaHS: NH-MR-68, WU:KNHHOPKI9




Offline kplew

  • Member
  • *
  • Posts: 36
    • Plew Farm Weather
Re: wxriverpage etc
« Reply #53 on: March 19, 2025, 03:24:53 PM »
Thanks- made the changes and it works. Still working on the riverdetail page, hard as it is to believe, chatgpt works pretty well debugging.