mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-19 23:56:17 +02:00
Fix SlackHandler
Slack API requires to json_encode the attachment field.
This commit is contained in:
committed by
Haralan Dobrev
parent
dd238892cf
commit
5fa5e37305
@@ -110,6 +110,10 @@ class SlackHandler extends SocketHandler
|
||||
$dataArray = $this->slackRecord->getSlackData($record);
|
||||
$dataArray['token'] = $this->token;
|
||||
|
||||
if (!empty($dataArray['attachments'])) {
|
||||
$dataArray['attachments'] = json_encode($dataArray['attachments']);
|
||||
}
|
||||
|
||||
return $dataArray;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user