/**
* Determine the type of the output
*
* @param string $buffer
*
* @return Boolean
*/
public function catchErrors($buffer)
{
if (!is_null(error_get_last())) {
$this->logger->error($buffer);
// Send error as email as configured
if ($this->config('email_errors')) {
$this->mailer->send('Crunz: reporting PHP Fatal error', $buffer);
}
}
return $buffer;
}