zen cart调用WordPress的文章时出现的错误

zen cart调用Wordpress的文章时出现的错误

Catchable fatal error: Object of class stdClass could not be converted to string in /home/public_html/zencart/blog/wp-includes/classes.php on line 273

于是查看了这个文件,发现有这么一行:

$this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar];

这个是没有问题的啊,哪里来的对象实例呢? 于是遍历这个数组:$this->public_query_vars, 发现里面有这个值是order, 天啊,这个就是Zen Cart 下单流程里的对象变量,怎么跑到这里来了?暂且先不理它从哪里跑来,迅速解决问题要紧,于是在classes.php文件260行:

$wpvar = $this->public_query_vars[$i];

//下面增加这行以过滤掉order这个对象实例

if($wpvar == ‘order’) continue;

标签


Warning: error_log(/www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/#log/log-0403.txt): failed to open stream: No such file or directory in /www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/spider.class.php on line 2900