• Resolved Dr. SEO

    (@drseo)


    Hi!

    Today I updated my WP site to 4.8, and then it crashed with error 500. Then I checked log files, and see that your plugin generated the issue.

    PHP Parse error: syntax error, unexpected ‘[‘ in …/wp-content/plugins/analytics-spam-blocker/analytics-spam-blocker-api.php on line 56

    I checked and found that original php is this:

    $report[‘domain’] = parse_url($report[‘domain’])[‘host’];

    I modified to this:

    $report[‘domain’] = parse_url($report[‘domain’][‘host’]);

    And then I can activate your plugin again.

    Please check that my modification right, or please update your plugin if needed!

    Kind regards,
    Jozsef VER

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Arnan

    (@adegans)

    Your modification breaks domain reporting. So that won’t work.

    I don’t get errors when activating the plugin or when reporting domains (where the function is used) – As far as I can tell it works fine as is.
    There are currently no other reports of this error.

    What else changed on your server? Any other updates?

    Thread Starter Dr. SEO

    (@drseo)

    Thank you for quick reply!

    I updated from 4.7.x to 4.8, and then crashed my site.

    I will switch on debug mode, and logging, and I will send you relevant logs.

    Kind regards,
    Jozsef VER

    Plugin Author Arnan

    (@adegans)

    Please use the forum on my site or the contact form for your findings.
    You’ll reach me quicker that way.

    https://ajdg.solutions/forums/forum/analytics-spam-blocker/
    https://ajdg.solutions/contact/

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fatal error when activating plugin’ is closed to new replies.