[Notifier][Slack] Error trown when having more than 10 fields specified #36346

This commit is contained in:
Daniel STANCU 2020-04-04 23:08:34 +03:00 committed by Fabien Potencier
parent 1c73297ad0
commit 68b2490ee2

View File

@ -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;
}