Convert header_sent exception into a notice error.
Convert header_sent exception into a notice error.

Throwing an exception here, causes an infinite loop when handling fatal
errors, as the shutdown function sends headers automatically.

Refs #5595

et304383/passbolt_api,et304383/passbolt_api,et304383/passbolt_api,et304383/passbolt_api,et304383/passbolt_api