Reputation: 1
I am getting this error message on some of my pages within worrdpress dashboard.
Google Analytics Stats
Warning: array_merge(): Argument #1 is not an array in /home/c5280den/public_html/wp-content/plugins/google-analyticator/google-api-php-client/src/Google_Client.php on line 40
Fatal error: Class name must be a valid object or a string in /home/c5280den/public_html/wp-content/plugins/google-analyticator/google-api-php-client/src/Google_Client.php on line 104
Any help is most appreciated!!
Upvotes: 0
Views: 129
Reputation: 618
You should update the plugin, if you've already done this then you can try the following:
FILE - google-analyticator > google-api-php-client > src > Google_Client.php
OLD CODE (starting at Line 35)
require_once "config.php";
// If a local configuration file is found, merge it's values with the default configuration
if (file_exists(dirname(__FILE__) . '/local_config.php')) {
$defaultConfig = $apiConfig;
require_once (dirname(__FILE__) . '/local_config.php');
$apiConfig = array_merge($defaultConfig, $apiConfig);
NEW CODE (starting at Line 35)
require_once (dirname(__FILE__) . "/config.php");
// If a local configuration file is found, merge it's values with the default configuration
if (file_exists(dirname(__FILE__) . '/local_config.php')) {
$defaultConfig = $apiConfig;
require_once (dirname(__FILE__) . '/local_config.php');
$apiConfig = array_merge($defaultConfig, $apiConfig);
Adding to line 35...
require_once (dirname(__FILE__) . "/config.php");
in place of...
require_once "config.php";
seems to have fixed the problem.
Get it from here https://wordpress.org/support/topic/recent-update-throws-error-in-settings-page
Upvotes: 1