Object of class stdClass could not be converted to string error


Updated January 19, 2014 ● 3,975 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 · 10 years ago
permalink · reply (0)

This website uses cookies. By continuing to use this site, you are accepting our Privacy Policy and Terms of Service.