Object of class stdClass could not be converted to string error
Updated January 19, 2014 ● 3,973 views
Yii channell is about Yii PHP Framework. Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, dry design and encourages rapid development. It works to streamline your application development and helps to ensure an extremely efficient, extensible, and maintainable end product.
If you are a fellow Yii developer, join us! Do not hesitate to share your ideas. If you have a Yii product, you are welcome to share your creation here.
Check out Yii Framework official website.
Hi,
I have this part of the code in my layout.
<?php if ($this->beginCache('cache_social_stats',array('duration'=>Yii::app()->params['pageCacheTime']))) { ?>
<?php $this->renderPartial('//layouts/social_stats'); ?>
<?php $this->endCache(); } ?>
Occasionally, my page will throw an error:
Object of class stdClass could not be converted to string
Anyone got a clue?
I figured out the problem. The yahooapi code that I'm using to get twitter followers count is not reeturning value sometimes. It's returning stdClass.
Robert2 · 10 years agopermalink · reply (0)