【问题标题】:Wordpress : Genesis-Legacy Theme errorWordpress:Genesis-Legacy Theme 错误
【发布时间】:2016-07-07 17:28:18
【问题描述】:
我在 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 行
非常感谢任何帮助!
【问题讨论】:
标签:
wordpress
analytics
genesis
【解决方案1】:
更新你的插件兄弟。如果已经更新,试试这个。
文件 - google-analyticator > 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