JsonException: simplify, we have newer PHP

This commit is contained in:
Thomas Gelf 2020-11-02 09:10:46 +01:00
parent ccd92674a6
commit f0524f4d46
1 changed files with 1 additions and 3 deletions

View File

@ -11,9 +11,7 @@ class JsonException extends IcingaException
if ($msg === null) {
return new static(static::getJsonErrorMessage(\json_last_error()));
} else {
$args = \func_get_args();
$args[0] = $msg . ': ' . static::getJsonErrorMessage(\json_last_error());
return \call_user_func_array('static::__construct', $args);
return new static($msg . ': ' . static::getJsonErrorMessage(\json_last_error()));
}
}