JF Twitter module problem fix

If you have experienced this error in your webpage:

Fatal error: Cannot use object of type stdClass as array in /modules/mod_jf_twitter/helper.php on line 38

Then it is a problem of “JF Twitter” module. Do the following on /modules/mod_jf_twitter/helper.php/helper.php on line 38:

Change this:

if(!empty($this->tweets)) {
$profile = $this->tweets[0]->user;

To this:

if(count($this->tweets)>1 and !empty($this->tweets)) {
$profile = $this->tweets[0]->user;
} else {
echo "";

I am not sure why this problem occurs, but I think it is because an application can do a fixed number of calls per hour on the Twitter API. The first time this error hapened to me was when Twitter.com was over capacity, but it happened again when Twitter.com was working. This happened on “JF Twitter V.2.3″

Source: http://klevismiho.com/jf-twitter-module-problem-fix/