added dedibuild to error and usage reporting

This commit is contained in:
kremsy
2017-03-26 13:58:23 +02:00
parent f2ab40a50f
commit d46eb59fb9
5 changed files with 150 additions and 142 deletions

View File

@ -27,7 +27,7 @@ class ErrorHandler {
* Private properties
*/
/** @var ManiaControl $maniaControl */
private $maniaControl = null;
private $maniaControl = null;
private $handlingError = null;
/**
@ -144,6 +144,8 @@ class ErrorHandler {
$report['ManiaControlVersion'] = ManiaControl::VERSION;
}
$report['DedicatedBuildVersion'] = $this->maniaControl->getDedicatedServerBuildVersion();
$json = json_encode(Formatter::utf8($report));
$info = base64_encode($json);
@ -235,7 +237,7 @@ class ErrorHandler {
$traceString = '';
$stepCount = 0;
foreach ($backtrace as $traceStep) {
$skipStep = $this->shouldSkipTraceStep($traceStep);
$skipStep = $this->shouldSkipTraceStep($traceStep);
$traceString .= '#' . $stepCount . ': ';
if (isset($traceStep['class'])) {
if (!$sourceClass && !$skipStep && !$this->isIgnoredSourceClass($traceStep['class'])) {
@ -329,7 +331,7 @@ class ErrorHandler {
} else if (is_array($arg)) {
$string .= 'array(' . $this->parseArgumentsArray($arg) . ')';
} else {
$type = gettype($arg);
$type = gettype($arg);
$string .= $type . '(';
if (is_string($arg)) {
$param = $arg;
@ -438,6 +440,8 @@ class ErrorHandler {
$report['ManiaControlVersion'] = ManiaControl::VERSION;
}
$report['DedicatedBuildVersion'] = $this->maniaControl->getDedicatedServerBuildVersion();
$errorReport = json_encode(Formatter::utf8($report));
$url = ManiaControl::URL_WEBSERVICE . 'errorreport';