Skip to content

Commit 4a5f275

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: [ErrorHandler] Return false directly and remove unused variable [OptionsResolver] Assert that the error type is valid in deprecations test [HttpClient] Allow bearer token with colon [Form] Fix custom formats deprecation with HTML5 widgets [Translator] Optional Intl dependency [Contracts][Translation] Optional Intl dependency [ErrorHandler] Escape JSON encoded log context update missing translations arabic [Yaml] simplify the test fix test by letting mock throw the actual expected exception
2 parents f3608d7 + 00a6122 commit 4a5f275

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private static function prepareRequest(?string $method, ?string $url, array $opt
111111
throw new InvalidArgumentException(sprintf('Option "auth_basic" must be string or an array, "%s" given.', get_debug_type($options['auth_basic'])));
112112
}
113113

114-
if (isset($options['auth_bearer']) && (!\is_string($options['auth_bearer']) || !preg_match('{^[-._=~+/0-9a-zA-Z]++$}', $options['auth_bearer']))) {
114+
if (isset($options['auth_bearer']) && (!\is_string($options['auth_bearer']) || !preg_match('{^[-._=:~+/0-9a-zA-Z]++$}', $options['auth_bearer']))) {
115115
throw new InvalidArgumentException(sprintf('Option "auth_bearer" must be a string containing only characters from the base 64 alphabet, %s given.', \is_string($options['auth_bearer']) ? 'invalid string' : '"'.get_debug_type($options['auth_bearer']).'"'));
116116
}
117117

0 commit comments

Comments
 (0)