mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
d1af532bf4
commit
1e09bc4907
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user