Fixed notice on messages class when $session['messages'] is not set.