• Resolved R3dRidl3

    (@r3dridl3)


    There is an error:
    Fatal Error (E_COMPILE_ERROR): Can’t use function return value in write context occurred in wp-content/plugins/google-analytics-for-wordpress/lite/includes/admin/wp-site-health.php on line 106

    Fix for this is:

    Change:
    $this->is_tracking = ! empty( monsterinsights_get_ua() );

    To this:
    $UAvar = monsterinsights_get_ua();
    $this->is_tracking = ! empty( $UAvar );

Viewing 8 replies - 1 through 8 (of 8 total)
  • I had the same issue, thank you for the fix.

    This is really related to having a PHP version less than 5.6 which is the new minimum for running newer versions of WordPress. I would see if you site can be updated to 5.6. If this plugin is going to require PHP 5.6 is should state that on its page and be part of the Changelog. Since that isn’t the case I’m going to say this was an oversight and will probably get fixed in the next update.

    Plugin Author chriscct7

    (@chriscct7)

    Hi there,
    We will have a fix out for this on or before Tuesday (our previously scheduled point release), but bare in mind, PHP 5.5 and below are not supported on WordPress versions that support health checks. WordPress Core should have actually blocked you from updating WordPress Core itself until you had updated PHP.

    -Chris

    I am blocked from updating WordPress but this update was not blocked from happening. It was performed by IWP on all of my sites. The WordPress requirements for this plugin are listed as anything 3.8 to 5.3. You can add a PHP version requirement to the plugin and that would resolve the issue.

    So the problem is we can’t even get to the admin login page to fix the code. The fatal error comes up in place of the login screen.

    FTP in and change the name of the Anylystics plugin folder. Then you’ll be able to login. Make the changes, change the folder name back and then reactivate the plug in.

    • This reply was modified 5 years, 5 months ago by Fencer04.
    Plugin Author chriscct7

    (@chriscct7)

    The 7.8.1 update that works around the PHP version being out of date has been issued.

    -Chris

    crossman01

    (@crossman01)

    I am getting this error

    Fatal error: Can’t use function return value in write context in /homepages/19/d497510717/htdocs/wp-content/plugins/revslider/includes/functions.class.php on line 1004

    How do I fix this?
    Best
    Ian

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal error: Can’t use function return value in write context’ is closed to new replies.