diff --git a/sources/AppBundle/Slack/LegacyClient.php b/sources/AppBundle/Slack/LegacyClient.php index 0c31c9065..1d4f1ceda 100644 --- a/sources/AppBundle/Slack/LegacyClient.php +++ b/sources/AppBundle/Slack/LegacyClient.php @@ -10,7 +10,11 @@ public function __construct(private $token) {} public function invite($email): void { - $return = file_get_contents(sprintf("https://slack.com/api/users.admin.invite?token=%s&email=%s", $this->token, $email)); + $url = 'https://slack.com/api/users.admin.invite?' . http_build_query([ + 'token' => $this->token, + 'email' => $email, + ]); + $return = file_get_contents($url); if (false === $return) { throw new \RuntimeException("Erreur lors de l'appel à l'API slack");