Object of class stdClass could not be converted to string error


Updated January 19, 2014 ● 3,886 views

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?

1 Comments

0

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 · 6 years ago
permalink · reply (0)

Our Terms of Use and Privacy Policy have changed.
By continuing to use this site, you are agreeing to the new Privacy Policy and Terms of Service.