PHP error - need help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
levani
Forum Newbie
Posts: 1
Joined: Fri Feb 27, 2009 1:03 pm

PHP error - need help

Post by levani »

Hi all

When I try to view author archive page in Wordpress I get this error message in sidebar:
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/answersg/public_html/wp-content/themes/answers/sidebar_category.php on line 24
This is the code on line 24:
<?php
$breadcrumbs = explode('|',get_category_parents($cat,true,'|'));
array_pop($breadcrumbs);
array_pop($breadcrumbs);
if ($breadcrumbs) foreach ($breadcrumbs as $crumb);
?>
Please help if you know what's wrong.

Thanks in advance
Post Reply