error reports via POST
This commit is contained in:
parent
72e16d63c8
commit
6d05920ffa
@ -70,8 +70,7 @@ class ErrorHandler {
|
|||||||
* @param bool $onShutdown
|
* @param bool $onShutdown
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function handleError($errorNumber, $errorString, $errorFile = null, $errorLine = -1, array $errorContext = array(),
|
public function handleError($errorNumber, $errorString, $errorFile = null, $errorLine = -1, array $errorContext = array(), $onShutdown = false) {
|
||||||
$onShutdown = false) {
|
|
||||||
$suppressed = (error_reporting() === 0);
|
$suppressed = (error_reporting() === 0);
|
||||||
if ($suppressed && !self::LOG_SUPPRESSED_ERRORS) {
|
if ($suppressed && !self::LOG_SUPPRESSED_ERRORS) {
|
||||||
return false;
|
return false;
|
||||||
@ -459,11 +458,10 @@ class ErrorHandler {
|
|||||||
$report['ManiaControlVersion'] = ManiaControl::VERSION;
|
$report['ManiaControlVersion'] = ManiaControl::VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
$json = json_encode(Formatter::utf8($report));
|
$errorReport = json_encode(Formatter::utf8($report));
|
||||||
$info = base64_encode($json);
|
|
||||||
|
|
||||||
$url = ManiaControl::URL_WEBSERVICE . 'errorreport?error=' . urlencode($info);
|
$url = ManiaControl::URL_WEBSERVICE . 'errorreport';
|
||||||
$response = WebReader::loadUrl($url);
|
$response = WebReader::postUrl($url, $errorReport);
|
||||||
$content = $response->getContent();
|
$content = $response->getContent();
|
||||||
$success = json_decode($content);
|
$success = json_decode($content);
|
||||||
if ($success) {
|
if ($success) {
|
||||||
|
Loading…
Reference in New Issue
Block a user