$type = isset($errortype[$errno]) ? $errortype[$errno] : $errno;
$errstr = utf8_encode(htmlentities($errstr));
if (php_sapi_name() == 'cli') {
$type = isset($errortype[$errno]) ? $errortype[$errno] : $errno;
$errstr = utf8_encode(htmlentities($errstr));
if (php_sapi_name() == 'cli') {