error output is called even if have no error

this is related to:
https://github.com/concrete5/concrete5/pull/1267
else we get
Fatal error: Call to a member function output() on a non-object in /.../concrete/single_pages/profile/messages.php on line 5