• Try to link Analytics account, get redirected to Google Account and that all works fine but when I return to my wordpress backend I get

    Fatal error: Cannot use object of type WP_Error as array in C:\xampp\htdocs\scn.org.nz\wp-content\plugins\better-analytics\library\DigitalPointBetterAnalytics\Helper\Reporting.php on line 171

    Please advise how to fix this issue.

    Thanks

    https://wordpress.org/plugins/better-analytics/

Viewing 1 replies (of 1 total)
  • Plugin Author digitalpoint

    (@digitalpoint)

    If you edit the C:\xampp\htdocs\scn.org.nz\wp-content\plugins\better-analytics\library\DigitalPointBetterAnalytics\Helper\Reporting.php file at that line…

    Add this:

    if (is_wp_error($response))
    {
    	$this->_showException($response->get_error_message());
    	return false;
    }

    before this line:
    return $response['body'];

    …so it looks like this:

    if (is_wp_error($response))
    {
    	$this->_showException($response->get_error_message());
    	return false;
    }
    return $response['body'];

    And give it a try again and then reload the page after the page view (the error won’t show immediately, but on the next page view), it should give you some info about why your WordPress install is throwing an error there.

    The WordPress http request handler will return a WP_Error class (like you are seeing) when there was an error making the connection and it should tell what it is exactly… like a bad SSL certificate, PHP not configured to allow fopen(), etc.

    If you are able to try that, please let me know what the error is coming back as.

Viewing 1 replies (of 1 total)

The topic ‘Fatal Error – can't link analytics account’ is closed to new replies.