Skip to content

Commit

Permalink
fix(symfony): mercure exception formatting by calling array_keys() (a…
Browse files Browse the repository at this point in the history
…pi-platform#6879)

Co-authored-by: Nathan den Haan <[email protected]>
  • Loading branch information
2 people authored and vinceAmstoutz committed Dec 24, 2024
1 parent 44d9fa9 commit 0fda047
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private function storeObjectToPublish(object $object, string $property): void

foreach ($options as $key => $value) {
if (!isset(self::ALLOWED_KEYS[$key])) {
throw new InvalidArgumentException(\sprintf('The option "%s" set in the "mercure" attribute of the "%s" resource does not exist. Existing options: "%s"', $key, $resourceClass, implode('", "', self::ALLOWED_KEYS)));
throw new InvalidArgumentException(\sprintf('The option "%s" set in the "mercure" attribute of the "%s" resource does not exist. Existing options: "%s"', $key, $resourceClass, implode('", "', array_keys(self::ALLOWED_KEYS))));
}
}

Expand Down

0 comments on commit 0fda047

Please sign in to comment.