MINOR Check that the error file exists in Debug (from r82791)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89723 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-10-21 02:32:55 +00:00
parent d1af532bf4
commit 1e09bc4907

View File

@ -383,6 +383,7 @@ class Debug {
$reporter->writeHeader($httpRequest); $reporter->writeHeader($httpRequest);
$reporter->writeError($httpRequest, $errno, $errstr, $errfile, $errline, $errcontext); $reporter->writeError($httpRequest, $errno, $errstr, $errfile, $errline, $errcontext);
if(file_exists($errfile)) {
$lines = file($errfile); $lines = file($errfile);
// Make the array 1-based // Make the array 1-based
@ -392,7 +393,7 @@ class Debug {
$offset = $errline-10; $offset = $errline-10;
$lines = array_slice($lines, $offset, 16, true); $lines = array_slice($lines, $offset, 16, true);
$reporter->writeSourceFragment($lines, $errline); $reporter->writeSourceFragment($lines, $errline);
}
$reporter->writeTrace(($errcontext ? $errcontext : debug_backtrace())); $reporter->writeTrace(($errcontext ? $errcontext : debug_backtrace()));
$reporter->writeFooter(); $reporter->writeFooter();
exit(1); exit(1);