Browse Source

Fix type error, fixes #1382

Jordi Boggiano 6 years ago
parent
commit
9776fa1d54
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Monolog/Handler/Slack/SlackRecord.php

+ 2 - 2
src/Monolog/Handler/Slack/SlackRecord.php

@@ -159,7 +159,7 @@ class SlackRecord
 
 
                     if ($this->useShortAttachment) {
                     if ($this->useShortAttachment) {
                         $attachment['fields'][] = $this->generateAttachmentField(
                         $attachment['fields'][] = $this->generateAttachmentField(
-                            $key,
+                            (string) $key,
                             $record[$key]
                             $record[$key]
                         );
                         );
                     } else {
                     } else {
@@ -324,7 +324,7 @@ class SlackRecord
     {
     {
         $fields = array();
         $fields = array();
         foreach ($this->normalizerFormatter->format($data) as $key => $value) {
         foreach ($this->normalizerFormatter->format($data) as $key => $value) {
-            $fields[] = $this->generateAttachmentField($key, $value);
+            $fields[] = $this->generateAttachmentField((string) $key, $value);
         }
         }
 
 
         return $fields;
         return $fields;