Log errors only if the logger is constructed
This commit is contained in:
parent
c5340d4565
commit
896956fe78
@ -25,7 +25,7 @@ class Exception extends \Exception
|
|||||||
if (error_reporting() === 0) {
|
if (error_reporting() === 0) {
|
||||||
return true; // return true to continue through the others error handlers
|
return true; // return true to continue through the others error handlers
|
||||||
}
|
}
|
||||||
\danog\MadelineProto\Logger::log([$errstr], \danog\MadelineProto\Logger::FATAL_ERROR);
|
if (\danog\MadelineProto\Logger::$constructed) \danog\MadelineProto\Logger::log([$errstr], \danog\MadelineProto\Logger::FATAL_ERROR);
|
||||||
$e = new \danog\MadelineProto\Exception($errstr, $errno);
|
$e = new \danog\MadelineProto\Exception($errstr, $errno);
|
||||||
$e->file = $errfile;
|
$e->file = $errfile;
|
||||||
$e->line = $errline;
|
$e->line = $errline;
|
||||||
|
Loading…
Reference in New Issue
Block a user