Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Catchable fatal error: Object of class stdClass could not be converted to string !? (http://forum.bytesforall.com/showthread.php?t=27)

neocratus Dec 13, 2008 06:53 AM

Catchable fatal error: Object of class stdClass could not be converted to string !?
 
i get this error:

Catchable fatal error: Object of class stdClass could not be converted to string in /home/wp-content/themes/atahualpa3/functions/bfa_postinfo.php on line 161

- some guys say
The issue has to do with PHP 5.2+ breaking certain backward-compatibility of converting a PHP 'object' to a text string. You either need to downgrade below 5.2, or the code where the error occurs needs to be 'properly fixed' to address the change (the fixes should then work on any version...)

Flynn Dec 13, 2008 12:56 PM

Thanks I know about it but need to get access to webspace with PHP 5.2 first

neocratus Dec 13, 2008 03:51 PM

can we help anyhow?

Flynn Dec 13, 2008 04:09 PM

Can you comment out line 161 in functions/bfa_postinfo.php by adding a hash sign # at the beginning of the line?

PHP Code:

#$postinfo = str_replace("%category%", $category, $postinfo); 

and see if the error goes away?

If not, add a hash to line 160 as well so you get

PHP Code:

#$postinfo = preg_replace("/(.*)%date\((.*?)\)%(.*)/i", "\\1" .$date. "\\3", $postinfo);
#$postinfo = str_replace("%category%", $category, $postinfo); 

If it goes away now, can you try to remove the hash from line 161 again and see if the error is still gone.

I am trying to find out if its line 161 or 160. Even though it says 161 it could be 160 as well.

campi Dec 13, 2008 04:25 PM

Quote:

Originally Posted by Flynn (Post 105)
Can you comment out line 161 in functions/bfa_postinfo.php by adding a hash sign # at the beginning of the line?

PHP Code:

#$postinfo = str_replace("%category%", $category, $postinfo); 

and see if the error goes away?

If not, add a hash to line 160 as well so you get

PHP Code:

#$postinfo = preg_replace("/(.*)%date\((.*?)\)%(.*)/i", "\\1" .$date. "\\3", $postinfo);
#$postinfo = str_replace("%category%", $category, $postinfo); 

If it goes away now, can you try to remove the hash from line 161 again and see if the error is still gone.

I am trying to find out if its line 161 or 160. Even though it says 161 it could be 160 as well.


Sorry for my english



Test 1
I've comment the line 161 in bfa_postinfo.php. The error disappears

Test 2
I've comment the line 160 in bfa_postinfo.php. I get the same error

Test 3
I've comment the line 160 and 161 in bfa_postinfo.php. The error disappears

neocratus Dec 13, 2008 04:33 PM

yes,

it worked like a charm,

thanks Flynn


First HASH was ok. Problem SOLVED!

Flynn Dec 13, 2008 04:45 PM

Thanks a lot campi and neocratus

If you don't need %category% (prints (only) the first category name the post is filed under) then it would indeed be solved for you, and I know now what line to work on

campi Dec 13, 2008 05:01 PM

Quote:

Originally Posted by Flynn (Post 108)
Thanks a lot campi and neocratus

If you don't need %category% (prints (only) the first category name the post is filed under) then it would indeed be solved for you, and I know now what line to work on

I updated my message

campi Dec 13, 2008 05:08 PM

Quote:

Originally Posted by campi (Post 106)
Sorry for my english



Test 1
I've comment the line 161 in bfa_postinfo.php. The error disappears

Test 2
I've comment the line 160 in bfa_postinfo.php. I get the same error

Test 3
I've comment the line 160 and 161 in bfa_postinfo.php. The error disappears

The same line in V2 and V3

Atahualpa V2

-> 12 Diciembre, 2008 | Tags: carnet, conducir, internacional, permiso | Category: Desde Espaņa | Editar | Comentarios (1)

Test 1
Comment the line 161

-> | carnetconducirinternacionalpermiso Category: Desde Espaņa |

Test 2
Comment the line 160

-> Catchable fatal error: Object of class stdClass could not be converted to string in /home1/vayafies/public_html/depaseoporaustralia/wp-content/themes/atahualpa3/functions/bfa_postinfo.php on line 161

Test 3
Comment the line 160 and 161

-> %date(\'F jS, Y\')% | carnetconducirinternacionalpermiso Category: Desde Espaņa |

Flynn Dec 13, 2008 05:18 PM

Most errors are coming from bfa_postinfo.php, I am on it

Also, see http://forum.bytesforall.com/showthread.php?t=35 regarding date issues. It may even fix the missing comma between tags?

campi Dec 13, 2008 05:25 PM

Quote:

Originally Posted by Flynn (Post 114)
Most errors are coming from bfa_postinfo.php, I am on it

Also, see http://forum.bytesforall.com/showthread.php?t=35 regarding date issues. It may even fix the missing comma between tags?

With Atahualpa v3 tags are wrong

and YAPB fails

WaterfrontGazette Dec 13, 2008 06:47 PM

WOW, I'm learning GREEK!


All times are GMT -6. The time now is 04:21 AM.

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