Don't output Fatal(...) error messages unless debugging is on to avoid leaking info. Fixes #2459

This commit is contained in:
Matthew Noorenberghe 2019-02-09 02:16:37 -08:00
parent 02f09aad7f
commit 98e0a0d2c5
1 changed files with 4 additions and 1 deletions

View File

@ -455,7 +455,10 @@ function Error( $string ) {
function Fatal( $string ) { function Fatal( $string ) {
Logger::fetch()->logPrint( Logger::FATAL, $string ); Logger::fetch()->logPrint( Logger::FATAL, $string );
die( htmlentities($string) ); if (Logger::fetch()->debugOn()) {
echo(htmlentities($string));
}
exit(1);
} }
function Panic( $string ) { function Panic( $string ) {