Fixed PHP warning that  was an invalid foreach() argument when there were not enough posts to cause pagination