Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Plugins & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=16)
-   -   SEARCH ERROR: Catchable fatal error:Object of class WP_Error could not be converted (http://forum.bytesforall.com/showthread.php?t=6559)

angelarose Apr 1, 2010 08:44 AM

SEARCH ERROR: Catchable fatal error:Object of class WP_Error could not be converted
 
When I Search on my site I get

Catchable fatal error: Object of class WP_Error could not be converted to string in REMOVED ADDRESS /wp-content/themes/atahualpa/functions/bfa_postinfo.php on line 308

Line 308 is blank....

// Author website link
LINE 308
if ( strpos($postinfo_string,'%author-link%') !== FALSE ) {

ob_start();

the_author_link();

$author_link = ob_get_contents();

ob_end_clean();

$postinfo = str_replace("%author-link%", $author_link, $postinfo);

}

I am a newbie and have no idea what I am doing! :)
Please advise. Thanks So Much and God Bless.
~Angela

juggledad Apr 1, 2010 06:35 PM

what version of Atahualpa and WP?
what is our URL?
How did you install Atahualpa?

Line 308 should be
HTML Code:

                $category_linked = '<a href="' . get_category_link($all_categories[0]->cat_ID) .

Mae Jul 8, 2010 03:42 PM

I have the same error:

Catchable fatal error: Object of class WP_Error could not be converted to string in ../htdocs/wp-content/themes/atahualpa351/functions/bfa_postinfo.php on line 308

WP 3.0
Atahualpa 3.5.1
No URL - Sorry
Line 308 is "$category_linked = '<a href="' . get_category_link($all_categories[0]->cat_ID) ."
(Use Notepad++)

Somebody told me to use this:
"
<?php
error_reporting(8191); // E_ALL und E_STRICT
ini_set('display_errors', TRUE); // evtl. hilfreich

function exception_error_handler($errno, $errstr, $errfile, $errline )
{
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}

set_error_handler("exception_error_handler");


class test {}

$test = new test;

try
{
echo $test;
}
catch(Exception $e)
{
echo "Ausnahme: ".$e->getmessage();
}

?>
"
But how did this help me?!?

juggledad Jul 8, 2010 05:05 PM

Quote:

Somebody told me to use this:
"
<--snip-->
?>
"
But how did this help me?!?
I would ask the person that suggested it to you.

Does it happen every time you do a search?
What is the url? if you want to keep it private, send it to me in a PM.


All times are GMT -6. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.