private static function RequestException::obfuscateUri in Lockr 7.3
Obfuscates URI if there is an username and a password present
Parameters
UriInterface $uri:
Return value
1 call to RequestException::obfuscateUri()
- RequestException::create in vendor/
guzzlehttp/ guzzle/ src/ Exception/ RequestException.php - Factory method to create a new exception with a normalized error message
File
- vendor/
guzzlehttp/ guzzle/ src/ Exception/ RequestException.php, line 162
Class
- RequestException
- HTTP Request exception
Namespace
GuzzleHttp\ExceptionCode
private static function obfuscateUri($uri) {
$userInfo = $uri
->getUserInfo();
if (false !== ($pos = strpos($userInfo, ':'))) {
return $uri
->withUserInfo(substr($userInfo, 0, $pos), '***');
}
return $uri;
}