2012-07-13 48 views
1

可捕获致命错误:类WP_Error的对象无法转换为/home/winentra/public_html/s1.ssonline.co.in/wp-content/themes中的字符串/peekaboo/admin/common-functions.php在该线上186错误:类WP_Error的对象无法转换为字符串

号线186

echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); 

任何想法吗?

+1

欢迎堆栈溢出。请小心,你的标题很难代表你问的东西。更好的写作会给你带来更好的答案。 – 2012-07-13 17:05:45

回答

1

如果一个复杂类型,PHP是不是能转换成打印字符串你得到返回的对象。

1

变化:

echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); 

echo is_wp_error($cat_parents = get_category_parents($cat, TRUE, '' . $delimiter . '')) ? '' : $cat_parents; 
+0

@iCodez我收到类似如下的错误:“可捕获的致命错误:类WP_Error的对象无法转换为1025行的/home/preprogrammer20/public_html/wp-includes/formatting.php中的字符串”我尝试了所有内容但是,没有任何工作。你能帮我么...?我应该在哪里添加上面的代码...? – 2016-04-12 02:49:53

相关问题