|
|
@ -17,7 +17,7 @@ class ErrorHandler |
|
|
|
set_error_handler(array('ErrorHandler', 'error_handler')); |
|
|
|
} |
|
|
|
|
|
|
|
static public function error_handler($errno, $errstr, $errfile, $errline ) |
|
|
|
static public function error_handler($errno, $errstr, $errfile, $errline) |
|
|
|
{ |
|
|
|
ob_clean(); |
|
|
|
throw new ErrorException($errstr, 0, $errno, $errfile, $errline); |
|
|
@ -28,16 +28,16 @@ class ErrorHandler |
|
|
|
{ |
|
|
|
$code = array(); |
|
|
|
$i = 0; |
|
|
|
foreach(file($file) as $line) { |
|
|
|
foreach (file($file) as $line) { |
|
|
|
$i++; |
|
|
|
if($i >= $hiline - 10 && $i <= $hiline + 10) { |
|
|
|
if ($i >= $hiline - 10 && $i <= $hiline + 10) { |
|
|
|
if ($i == $hiline) { |
|
|
|
$code[] = '<tr class="error"><th>' . $i . '</th><td><span class="specific">' . htmlentities($line, ENT_QUOTES, 'UTF-8') . '</span></td></tr>'; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
$code[] = '<tr><th>' . $i . '</th><td>' . htmlentities($line, ENT_QUOTES, 'UTF-8') . '</td></tr>'; |
|
|
|
} |
|
|
|
} |
|
|
|
if($i > $hiline + 10) { |
|
|
|
if ($i > $hiline + 10) { |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
@ -88,7 +88,7 @@ class ErrorHandler |
|
|
|
$cookies = self::wrapArray(Env::Cookie(), 'COOKIE'); |
|
|
|
$server = self::wrapArray(Env::Server(), 'SERVER'); |
|
|
|
|
|
|
|
$message =<<<EOD |
|
|
|
$message = <<<EOD |
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
|
|
<head> |
|
|
|