Twitter feed error

Permalink
Hi - I just recently switched over to C5 for my website. I have a twitter feed on my homepage but it often (but not always) shows this error:

Warning: Invalid argument supplied for foreach() in /home1/upperech/public_html/blocks/twitter/controller.php on line 61

The website is here: www.www.upperechelonfitness.com...

Any thoughts on the problem? Thanks!

RC

 
Tony replied on at Permalink Reply
Tony
not sure what twitter block you're using, since there are a few out there. did you download it from the marketplace?

regardless, it looks like you need to add this to line 61 of controller:

if( is_array($arrayVariable) ) foreach(....


but swap out $arrayVariable with whatever array variable is being feed into the foreach loop.