You are here

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

UriInterface

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\Exception

Code

private static function obfuscateUri($uri) {
  $userInfo = $uri
    ->getUserInfo();
  if (false !== ($pos = strpos($userInfo, ':'))) {
    return $uri
      ->withUserInfo(substr($userInfo, 0, $pos), '***');
  }
  return $uri;
}