! smiley loading could cause invalid argument in foreach
under certain conditions.  Thanks to Allan for the report.
http://www.elkarte.net/community/index.php?topic=1943.0
Merge pull request #1799 from Spuds/fii

smiley loading could cause invalid argument in foreach