dont send early exceptions to the client only, leave a trace in the error log too

This commit is contained in:
Florian Schlichting 2017-04-08 16:43:21 +02:00
parent 323292eb8c
commit 06e20e5508
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ function early_exception_handler($e) {
foreach( $trace AS $k => $v ) {
printf( "%s[%d] %s%s%s()\n", $v['file'], $v['line'], (isset($v['class'])?$v['class']:''), (isset($v['type'])?$v['type']:''), (isset($v['function'])?$v['function']:'') );
}
error_log("PHP Early Exception: [".$e->getCode()."] ".$e->getmessage()." at ".$e->getFile().":".$e->getLine());
}
set_exception_handler('early_exception_handler');

View File

@ -38,7 +38,7 @@ function early_exception_handler($e) {
foreach( $trace AS $k => $v ) {
printf( "%s[%d] %s%s%s()\n", $v['file'], $v['line'], (isset($v['class'])?$v['class']:''), (isset($v['type'])?$v['type']:''), (isset($v['function'])?$v['function']:'') );
}
error_log("PHP Early Exception: [".$e->getCode()."] ".$e->getmessage()." at ".$e->getFile().":".$e->getLine());
}
set_exception_handler('early_exception_handler');