From b73e5816da65dda885d33279c08afc9677b8a07e Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Sun, 14 Apr 2024 16:46:47 +0200 Subject: [PATCH] explixitly set arg_separator for generateURI We cannot rely on arg_separator.output to be set to it's default '&', therefore we explicitly set it here. Signed-off-by: Daniel Ziegenberg --- src/OTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OTP.php b/src/OTP.php index 49e1730..9c6aca3 100644 --- a/src/OTP.php +++ b/src/OTP.php @@ -98,7 +98,7 @@ protected function generateURI(string $type, array $options): string $this->hasColon($label) === false || throw new InvalidArgumentException('Label must not contain a colon.'); $options = [...$options, ...$this->getParameters()]; $this->filterOptions($options); - $params = str_replace(['+', '%7E'], ['%20', '~'], http_build_query($options)); + $params = str_replace(['+', '%7E'], ['%20', '~'], http_build_query($options, arg_separator: '&')); return sprintf( 'otpauth://%s/%s?%s',