public static function fireAlert($text, $error)
{
$head = 'MIME-Version: 1.1' . PHP_EOL;
$head .= 'Content-type: text/html; charset=utf-8' . PHP_EOL;
$head .= 'From: Automatic Alert <[email protected]>' . PHP_EOL;
$head .= 'Return-Path: Automatic Alert <[email protected]>' . PHP_EOL;
$body = 'Diagnostic alert:<br /><br /><b>' . $error->getMessage() . '</b><br />' . $error->getFile() . ' : ' . $error->getLine();
if (static::PDO4YOU_FIREALERT) {
@mail(static::PDO4YOU_WEBMASTER, $text, $body, $head);
}
}