Function the_content not working

My error was on line 21, the global variable $pages is used by the wordpress. Overwriting it on that line caused the error above.