Support » Plugin: Google Analytics Dashboard Plugin for WordPress by MonsterInsights » Fatal error: Can’t use function return value in write context

  • Resolved 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:

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

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

Viewing 7 replies - 1 through 7 (of 7 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


    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.


    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 4 months, 1 week ago by Fencer04.
    Plugin Support jaygidwitz


    Plugin Author chriscct7


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


Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.