Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mttzzz committed Apr 22, 2020
1 parent 433cb72 commit 3e7ae5d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Telegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static function log($note)
'line' => $note->getLine(),
'file' => $note->getFile()
];
$note = json_encode($note, 64 | 128 | 256);
$note = json_encode($note, 64 | 128 | 256 | 2048);
if (config('sentry.dsn')) {
$sentryId = mb_split('/', config('sentry.dsn'))[3];
$url = 'https://sentry.io/organizations/pushka/issues/?project=' . $sentryId;
Expand All @@ -31,11 +31,12 @@ public static function log($note)
$message = str_replace(['\n', ' ', "\n"], '', $note['message']);
$note = compact('message');
}
$note = json_encode($note, 64 | 128 | 256);
$note = json_encode($note, 64 | 128 | 256 | 2048);
} else {
$noteArray = json_decode($note);

$noteArray = json_decode(urldecode($note),1);
if (json_last_error() == JSON_ERROR_NONE) {
$note = json_encode($noteArray, 64 | 128 | 256);
$note = json_encode($noteArray, 64 | 128 | 256 | 2048 );
}
}
$token = config('telegramLog.token');
Expand Down

0 comments on commit 3e7ae5d

Please sign in to comment.