Wordpress:Genesis-Legacy 主题错误

问题描述 投票:0回答:1

我在 wordpress 仪表板中的某些页面上收到此错误消息。

谷歌分析统计

警告:array_merge():参数 #1 不是数组 /home/c5280den/public_html/wp-content/plugins/google-analyticator/google-api-php-client/src/Google_Client.php 40号线

致命错误:类名必须是有效对象或字符串 /home/c5280den/public_html/wp-content/plugins/google-analyticator/google-api-php-client/src/Google_Client.php 104号线

非常感谢任何帮助!!

php wordpress analytics genesis
1个回答
1
投票

更新你的插件兄弟..如果已经更新,请尝试这个。

文件 - 谷歌分析器 > google-api-php-client > src > Google_Client.php

旧代码(从第 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);

新代码(从第 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);

添加到第 35 行...

require_once (dirname(__FILE__) . "/config.php");

代替...

require_once "config.php";

似乎已经解决了问题。

从这里获取https://wordpress.org/support/topic/recent-update-throws-error-in-settings-page

© www.soinside.com 2019 - 2024. All rights reserved.