Fix undefined variable  on get_img() (see issue 2)
Fix undefined variable posts_data on get_popular_posts() (see issue 1)