You should really redirect before you start page output
  • line 1118 of /lib/outputrenderers.php: call to debugging()
  • line 2865 of /lib/weblib.php: call to core_renderer->redirect_message()
  • line 197 of /index.php: call to redirect()