update
This commit is contained in:
parent
dac702b627
commit
adaf59cbd9
@ -37,7 +37,7 @@ class ErrorHandler {
|
|||||||
$message .= "Trace: {$ex->getTraceAsString()}" . PHP_EOL;
|
$message .= "Trace: {$ex->getTraceAsString()}" . PHP_EOL;
|
||||||
logMessage($message);
|
logMessage($message);
|
||||||
|
|
||||||
$error = array();
|
$error = array();
|
||||||
$error["Type"] = "Exception";
|
$error["Type"] = "Exception";
|
||||||
$error["Message"] = $message;
|
$error["Message"] = $message;
|
||||||
$error['OperatingSystem'] = php_uname();
|
$error['OperatingSystem'] = php_uname();
|
||||||
@ -87,30 +87,30 @@ class ErrorHandler {
|
|||||||
// Error suppressed
|
// Error suppressed
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log error
|
// Log error
|
||||||
$errorTag = $this->getErrorTag($errorNumber);
|
$errorTag = $this->getErrorTag($errorNumber);
|
||||||
$message = "{$errorTag}: {$errorString} in File '{$errorFile}' on Line {$errorLine}!";
|
$message = "{$errorTag}: {$errorString} in File '{$errorFile}' on Line {$errorLine}!";
|
||||||
logMessage($message);
|
logMessage($message);
|
||||||
|
|
||||||
if ($errorNumber != E_USER_ERROR && $errorNumber != E_USER_WARNING && $errorNumber != E_USER_NOTICE) {
|
if ($errorNumber != E_USER_ERROR && $errorNumber != E_USER_WARNING && $errorNumber != E_USER_NOTICE) {
|
||||||
$error = array();
|
|
||||||
$error["Type"] = "Error";
|
$error["Type"] = "Error";
|
||||||
$error["Message"] = $message;
|
$error["Message"] = $message;
|
||||||
$error['OperatingSystem'] = php_uname();
|
$error['OperatingSystem'] = php_uname();
|
||||||
$error['PHPVersion'] = phpversion();
|
$error['PHPVersion'] = phpversion();
|
||||||
|
|
||||||
if ($this->maniaControl->server != null) {
|
if ($this->maniaControl->server) {
|
||||||
$error['ServerLogin'] = $this->maniaControl->server->login;
|
$error['ServerLogin'] = $this->maniaControl->server->login;
|
||||||
} else {
|
} else {
|
||||||
$error['ServerLogin'] = null;
|
$error['ServerLogin'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->maniaControl->settingManager != null && $this->maniaControl->updateManager != null) {
|
if ($this->maniaControl->settingManager && $this->maniaControl->updateManager) {
|
||||||
$error['UpdateChannel'] = $this->maniaControl->settingManager->getSetting($this->maniaControl->updateManager, UpdateManager::SETTING_UPDATECHECK_CHANNEL);
|
$error['UpdateChannel'] = $this->maniaControl->settingManager->getSetting($this->maniaControl->updateManager, UpdateManager::SETTING_UPDATECHECK_CHANNEL);
|
||||||
$error['ManiaControlVersion'] = $this->maniaControl->updateManager->getCurrentBuildDate();
|
$error['ManiaControlVersion'] = $this->maniaControl->updateManager->getCurrentBuildDate();
|
||||||
} else {
|
} else {
|
||||||
$error['UpdateChannel'] = null;
|
$error['UpdateChannel'] = '';
|
||||||
$error['ManiaControlVersion'] = ManiaControl::VERSION;
|
$error['ManiaControlVersion'] = ManiaControl::VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user