By stephtek on
I am developing a theme and when go to view it, it spits out this error:
recoverable fatal error: Object of class stdClass could not be converted to string in /home/www/coquitlamcentre.com/htdocs/sites/all/themes/cqcmicrosite/page.tpl.php on line 1.
Line one is <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language ?>" lang="<?php print $language ?>">
Any ideas why this is?
Comments
$language->language
$language is an object. Use
$language->language.Cheers,
efolia
you mean like this? <html
you mean like this?
Thanks
Thanks for this. I had the same exact issue. your html above worked perfectly.
Thanks. It works for me
Thanks. It works for me
Still works. Thanks!
Still works. Thanks!
$language->language
thank you! this helped me so easily & effortlessly :)
Rachel
You Rock!!!
Was converting a theme from 5.x to 6.x and it was killing me figuring out where the issue was. Thank you so much!!!
Stac...
same problem, code looks the same
I upgraded a theme from 5x to 6x and I am getting this error message, "recoverable fatal error: Object of class stdClass could not be converted to string in .../themes/litejazz/page.tpl.php on line 2." But when I looked at the page.tpl.php it looks exactly like the fix posted here. (The theme is LiteJazz from RoopleTheme.)
This is the line 2 in question:
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>"Any suggestions would be appreciated!
10x I spend 1 day to find an
10x I spend 1 day to find an error and you help very much