[Notifier][Slack] Error trown when having more than 10 fields specified #36346
This commit is contained in:
parent
1c73297ad0
commit
68b2490ee2
@ -44,6 +44,11 @@ final class SlackSectionBlock extends AbstractSlackBlock
|
||||
'text' => $text,
|
||||
];
|
||||
|
||||
// Maximum number of items is 10
|
||||
if (10 <= \count($this->options['fields'])) {
|
||||
throw new \LogicException('Maximum number of fields should not exceed 10.');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user