After i've edited the post I try to view it and this error appeared instead of the post:
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/cinemato/public_html/wp-content/themes/Cinematone/functions.php on line 125
the functions.php 125 string:
elseif ( is_attachment() ) {
$parent = get_post($parent_id);
$cat = get_the_category($parent->ID); $cat = $cat[0];
$cats = get_category_parents($cat, TRUE, $delimiter);
<em>//125 string below</em>
$cats = str_replace('<a', $link_before . '<a' . $link_attr, $cats);
$cats = str_replace('</a>', '</a>' . $link_after, $cats);
if ($show_title == 0) $cats = preg_replace('/ title="(.*?)"/', '', $cats);
echo $cats;
printf($link, get_permalink($parent), $parent->post_title);
if ($show_current == 1) echo $delimiter . $before . get_the_title() . $after;
}
but if I change the permalink (for example remove this symbol "-" or add\remove the letter) post normally shows.
Could you help me what should I do to resolve this problem
The website - http://www.cinematone.com