Author Topic: wxnwsalertslog error  (Read 747 times)

0 Members and 1 Guest are viewing this topic.

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
wxnwsalertslog error
« on: December 01, 2017, 01:14:00 PM »
http://gosportwx.com/wxnws-alerts-log.php

Warning: Illegal string offset 'Clay Co.' in /home/hj2ke8lfpx43/public_html/wxnws-alerts-log.php on line 172

Fatal error: Uncaught Error: Cannot use string offset as an array in /home/hj2ke8lfpx43/public_html/wxnws-alerts-log.php:172 Stack trace: #0 {main} thrown in /home/hj2ke8lfpx43/public_html/wxnws-alerts-log.php on line 172

not sure what this means if anyone can weigh in.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: wxnwsalertslog error
« Reply #1 on: December 01, 2017, 01:41:04 PM »
bump
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1019
    • Southern Maryland Weather
Re: wxnwsalertslog error
« Reply #2 on: December 01, 2017, 01:53:36 PM »
I'd help if you could attach a copy of the script....

Jim

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: wxnwsalertslog error
« Reply #3 on: December 01, 2017, 02:00:20 PM »
From saratoga's template not sure what happened I never messed with anything.. Just reuploaded from old server to Godaddy.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1019
    • Southern Maryland Weather
Re: wxnwsalertslog error
« Reply #4 on: December 01, 2017, 02:08:09 PM »
Line 172 shows

 $revData[$data[1]][$data[0]][] = array($data[0],$data[1],$issued,$expired,$data[4],$data[5],$data[6],$data[2],$data[3]);

It expects an array . However it is defined as a string on line 64

$revData ='';


Jim




Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: wxnwsalertslog error
« Reply #5 on: December 01, 2017, 02:11:02 PM »
Line 172 shows

 $revData[$data[1]][$data[0]][] = array($data[0],$data[1],$issued,$expired,$data[4],$data[5],$data[6],$data[2],$data[3]);

It expects an array . However it is defined as a string on line 64

$revData ='';


Jim

ok how do i fix it? not sure how.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1019
    • Southern Maryland Weather
Re: wxnwsalertslog error
« Reply #6 on: December 01, 2017, 02:14:07 PM »
You may have to grab the latest version. I have an older version with the same piece of code and it works. I have modified it though...

Ken may be able to assist on this and point you in the right direction.

Jim
« Last Edit: December 01, 2017, 02:18:22 PM by SoMDWx »

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: wxnwsalertslog error
« Reply #7 on: December 01, 2017, 02:18:04 PM »
Is this the latest version of nwsalerts? You may have to go grab it.

yep latest version
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: wxnwsalertslog error
« Reply #8 on: December 01, 2017, 02:18:48 PM »
Is this the latest version of nwsalerts? You may have to go grab it.

yep latest version

unless there's a new one out that i dont kno of.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1019
    • Southern Maryland Weather
Re: wxnwsalertslog error
« Reply #9 on: December 01, 2017, 02:19:47 PM »
I just went to your site and clicked on the alerts. They seem to work ok.

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: wxnwsalertslog error
« Reply #10 on: December 01, 2017, 02:33:51 PM »
You were probably using a version of PHP < 7 before.  You are now on 7.1.9 (http://gosportwx.com/check-fetch-times.php) and there were changes in PHP7 in this area.

Where you see cases of a variable initialized like:

Code: [Select]
$revData ='';
and then used as an array, change that first line of code to:

Code: [Select]
$revData = array();
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: wxnwsalertslog error
« Reply #11 on: December 01, 2017, 02:47:39 PM »
« Last Edit: December 01, 2017, 02:49:35 PM by mkutche »
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------