public function error_handler($type)
{
// Skip strict & deprecated warnings.
if (defined('E_DEPRECATED') && E_DEPRECATED === $type || defined('E_STRICT') && E_STRICT === $type || 0 === error_reporting()) {
return false;
}
/**
* Get the details of the error.
*
* These are:
*
* @param int $errorno The error level expressed as an integer.
* @param string $errstr The error message.
* @param string $errfile The file that the error raised in.
* @param string $errorline The line number the error was raised on.
*/
$args = func_get_args();
// Strip the error level
array_shift($args);
// Fire a warning for the PHP error passing the message, file and line number.
$this->warning('php', implode(', ', array_splice($args, 0, 3)));
return false;
}