Skip to content

Commit

Permalink
[FrameworkBundle][Workflow] Throw exception is workflow.xxx.transitio…
Browse files Browse the repository at this point in the history
…ns is not an array
  • Loading branch information
lyrixx committed Jul 24, 2023
1 parent 0bc39e8 commit ebbcd7c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,10 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
return $transitions;
}

if (!is_array($transitions)) {
throw new InvalidConfigurationException('The "transitions" option must be an array in workflow configuration.');
}

foreach ($transitions as $name => $transition) {
if (\is_array($transition) && \array_key_exists('name', $transition)) {
continue;
Expand Down

0 comments on commit ebbcd7c

Please sign in to comment.