Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../vendor/guzzleht.../psr7/src
File: Uri.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace GuzzleHttp\Psr7;
[2] Fix | Delete
[3] Fix | Delete
use Psr\Http\Message\UriInterface;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* PSR-7 URI implementation.
[7] Fix | Delete
*
[8] Fix | Delete
* @author Michael Dowling
[9] Fix | Delete
* @author Tobias Schultze
[10] Fix | Delete
* @author Matthew Weier O'Phinney
[11] Fix | Delete
*/
[12] Fix | Delete
class Uri implements UriInterface
[13] Fix | Delete
{
[14] Fix | Delete
/**
[15] Fix | Delete
* Absolute http and https URIs require a host per RFC 7230 Section 2.7
[16] Fix | Delete
* but in generic URIs the host can be empty. So for http(s) URIs
[17] Fix | Delete
* we apply this default host when no host is given yet to form a
[18] Fix | Delete
* valid URI.
[19] Fix | Delete
*/
[20] Fix | Delete
const HTTP_DEFAULT_HOST = 'localhost';
[21] Fix | Delete
[22] Fix | Delete
private static $defaultPorts = [
[23] Fix | Delete
'http' => 80,
[24] Fix | Delete
'https' => 443,
[25] Fix | Delete
'ftp' => 21,
[26] Fix | Delete
'gopher' => 70,
[27] Fix | Delete
'nntp' => 119,
[28] Fix | Delete
'news' => 119,
[29] Fix | Delete
'telnet' => 23,
[30] Fix | Delete
'tn3270' => 23,
[31] Fix | Delete
'imap' => 143,
[32] Fix | Delete
'pop' => 110,
[33] Fix | Delete
'ldap' => 389,
[34] Fix | Delete
];
[35] Fix | Delete
[36] Fix | Delete
private static $charUnreserved = 'a-zA-Z0-9_\-\.~';
[37] Fix | Delete
private static $charSubDelims = '!\$&\'\(\)\*\+,;=';
[38] Fix | Delete
private static $replaceQuery = ['=' => '%3D', '&' => '%26'];
[39] Fix | Delete
[40] Fix | Delete
/** @var string Uri scheme. */
[41] Fix | Delete
private $scheme = '';
[42] Fix | Delete
[43] Fix | Delete
/** @var string Uri user info. */
[44] Fix | Delete
private $userInfo = '';
[45] Fix | Delete
[46] Fix | Delete
/** @var string Uri host. */
[47] Fix | Delete
private $host = '';
[48] Fix | Delete
[49] Fix | Delete
/** @var int|null Uri port. */
[50] Fix | Delete
private $port;
[51] Fix | Delete
[52] Fix | Delete
/** @var string Uri path. */
[53] Fix | Delete
private $path = '';
[54] Fix | Delete
[55] Fix | Delete
/** @var string Uri query string. */
[56] Fix | Delete
private $query = '';
[57] Fix | Delete
[58] Fix | Delete
/** @var string Uri fragment. */
[59] Fix | Delete
private $fragment = '';
[60] Fix | Delete
[61] Fix | Delete
/**
[62] Fix | Delete
* @param string $uri URI to parse
[63] Fix | Delete
*/
[64] Fix | Delete
public function __construct($uri = '')
[65] Fix | Delete
{
[66] Fix | Delete
// weak type check to also accept null until we can add scalar type hints
[67] Fix | Delete
if ($uri != '') {
[68] Fix | Delete
$parts = self::parse($uri);
[69] Fix | Delete
if ($parts === false) {
[70] Fix | Delete
throw new \InvalidArgumentException("Unable to parse URI: $uri");
[71] Fix | Delete
}
[72] Fix | Delete
$this->applyParts($parts);
[73] Fix | Delete
}
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
/**
[77] Fix | Delete
* UTF-8 aware \parse_url() replacement.
[78] Fix | Delete
*
[79] Fix | Delete
* The internal function produces broken output for non ASCII domain names
[80] Fix | Delete
* (IDN) when used with locales other than "C".
[81] Fix | Delete
*
[82] Fix | Delete
* On the other hand, cURL understands IDN correctly only when UTF-8 locale
[83] Fix | Delete
* is configured ("C.UTF-8", "en_US.UTF-8", etc.).
[84] Fix | Delete
*
[85] Fix | Delete
* @see https://bugs.php.net/bug.php?id=52923
[86] Fix | Delete
* @see https://www.php.net/manual/en/function.parse-url.php#114817
[87] Fix | Delete
* @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING
[88] Fix | Delete
*
[89] Fix | Delete
* @param string $url
[90] Fix | Delete
*
[91] Fix | Delete
* @return array|false
[92] Fix | Delete
*/
[93] Fix | Delete
private static function parse($url)
[94] Fix | Delete
{
[95] Fix | Delete
// If IPv6
[96] Fix | Delete
$prefix = '';
[97] Fix | Delete
if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
[98] Fix | Delete
$prefix = $matches[1];
[99] Fix | Delete
$url = $matches[2];
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
$encodedUrl = preg_replace_callback(
[103] Fix | Delete
'%[^:/@?&=#]+%usD',
[104] Fix | Delete
static function ($matches) {
[105] Fix | Delete
return urlencode($matches[0]);
[106] Fix | Delete
},
[107] Fix | Delete
$url
[108] Fix | Delete
);
[109] Fix | Delete
[110] Fix | Delete
$result = parse_url($prefix . $encodedUrl);
[111] Fix | Delete
[112] Fix | Delete
if ($result === false) {
[113] Fix | Delete
return false;
[114] Fix | Delete
}
[115] Fix | Delete
[116] Fix | Delete
return array_map('urldecode', $result);
[117] Fix | Delete
}
[118] Fix | Delete
[119] Fix | Delete
public function __toString()
[120] Fix | Delete
{
[121] Fix | Delete
return self::composeComponents(
[122] Fix | Delete
$this->scheme,
[123] Fix | Delete
$this->getAuthority(),
[124] Fix | Delete
$this->path,
[125] Fix | Delete
$this->query,
[126] Fix | Delete
$this->fragment
[127] Fix | Delete
);
[128] Fix | Delete
}
[129] Fix | Delete
[130] Fix | Delete
/**
[131] Fix | Delete
* Composes a URI reference string from its various components.
[132] Fix | Delete
*
[133] Fix | Delete
* Usually this method does not need to be called manually but instead is used indirectly via
[134] Fix | Delete
* `Psr\Http\Message\UriInterface::__toString`.
[135] Fix | Delete
*
[136] Fix | Delete
* PSR-7 UriInterface treats an empty component the same as a missing component as
[137] Fix | Delete
* getQuery(), getFragment() etc. always return a string. This explains the slight
[138] Fix | Delete
* difference to RFC 3986 Section 5.3.
[139] Fix | Delete
*
[140] Fix | Delete
* Another adjustment is that the authority separator is added even when the authority is missing/empty
[141] Fix | Delete
* for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with
[142] Fix | Delete
* `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But
[143] Fix | Delete
* `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
[144] Fix | Delete
* that format).
[145] Fix | Delete
*
[146] Fix | Delete
* @param string $scheme
[147] Fix | Delete
* @param string $authority
[148] Fix | Delete
* @param string $path
[149] Fix | Delete
* @param string $query
[150] Fix | Delete
* @param string $fragment
[151] Fix | Delete
*
[152] Fix | Delete
* @return string
[153] Fix | Delete
*
[154] Fix | Delete
* @link https://tools.ietf.org/html/rfc3986#section-5.3
[155] Fix | Delete
*/
[156] Fix | Delete
public static function composeComponents($scheme, $authority, $path, $query, $fragment)
[157] Fix | Delete
{
[158] Fix | Delete
$uri = '';
[159] Fix | Delete
[160] Fix | Delete
// weak type checks to also accept null until we can add scalar type hints
[161] Fix | Delete
if ($scheme != '') {
[162] Fix | Delete
$uri .= $scheme . ':';
[163] Fix | Delete
}
[164] Fix | Delete
[165] Fix | Delete
if ($authority != ''|| $scheme === 'file') {
[166] Fix | Delete
$uri .= '//' . $authority;
[167] Fix | Delete
}
[168] Fix | Delete
[169] Fix | Delete
$uri .= $path;
[170] Fix | Delete
[171] Fix | Delete
if ($query != '') {
[172] Fix | Delete
$uri .= '?' . $query;
[173] Fix | Delete
}
[174] Fix | Delete
[175] Fix | Delete
if ($fragment != '') {
[176] Fix | Delete
$uri .= '#' . $fragment;
[177] Fix | Delete
}
[178] Fix | Delete
[179] Fix | Delete
return $uri;
[180] Fix | Delete
}
[181] Fix | Delete
[182] Fix | Delete
/**
[183] Fix | Delete
* Whether the URI has the default port of the current scheme.
[184] Fix | Delete
*
[185] Fix | Delete
* `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used
[186] Fix | Delete
* independently of the implementation.
[187] Fix | Delete
*
[188] Fix | Delete
* @param UriInterface $uri
[189] Fix | Delete
*
[190] Fix | Delete
* @return bool
[191] Fix | Delete
*/
[192] Fix | Delete
public static function isDefaultPort(UriInterface $uri)
[193] Fix | Delete
{
[194] Fix | Delete
return $uri->getPort() === null
[195] Fix | Delete
|| (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]);
[196] Fix | Delete
}
[197] Fix | Delete
[198] Fix | Delete
/**
[199] Fix | Delete
* Whether the URI is absolute, i.e. it has a scheme.
[200] Fix | Delete
*
[201] Fix | Delete
* An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true
[202] Fix | Delete
* if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative
[203] Fix | Delete
* to another URI, the base URI. Relative references can be divided into several forms:
[204] Fix | Delete
* - network-path references, e.g. '//example.com/path'
[205] Fix | Delete
* - absolute-path references, e.g. '/path'
[206] Fix | Delete
* - relative-path references, e.g. 'subpath'
[207] Fix | Delete
*
[208] Fix | Delete
* @param UriInterface $uri
[209] Fix | Delete
*
[210] Fix | Delete
* @return bool
[211] Fix | Delete
*
[212] Fix | Delete
* @see Uri::isNetworkPathReference
[213] Fix | Delete
* @see Uri::isAbsolutePathReference
[214] Fix | Delete
* @see Uri::isRelativePathReference
[215] Fix | Delete
* @link https://tools.ietf.org/html/rfc3986#section-4
[216] Fix | Delete
*/
[217] Fix | Delete
public static function isAbsolute(UriInterface $uri)
[218] Fix | Delete
{
[219] Fix | Delete
return $uri->getScheme() !== '';
[220] Fix | Delete
}
[221] Fix | Delete
[222] Fix | Delete
/**
[223] Fix | Delete
* Whether the URI is a network-path reference.
[224] Fix | Delete
*
[225] Fix | Delete
* A relative reference that begins with two slash characters is termed an network-path reference.
[226] Fix | Delete
*
[227] Fix | Delete
* @param UriInterface $uri
[228] Fix | Delete
*
[229] Fix | Delete
* @return bool
[230] Fix | Delete
*
[231] Fix | Delete
* @link https://tools.ietf.org/html/rfc3986#section-4.2
[232] Fix | Delete
*/
[233] Fix | Delete
public static function isNetworkPathReference(UriInterface $uri)
[234] Fix | Delete
{
[235] Fix | Delete
return $uri->getScheme() === '' && $uri->getAuthority() !== '';
[236] Fix | Delete
}
[237] Fix | Delete
[238] Fix | Delete
/**
[239] Fix | Delete
* Whether the URI is a absolute-path reference.
[240] Fix | Delete
*
[241] Fix | Delete
* A relative reference that begins with a single slash character is termed an absolute-path reference.
[242] Fix | Delete
*
[243] Fix | Delete
* @param UriInterface $uri
[244] Fix | Delete
*
[245] Fix | Delete
* @return bool
[246] Fix | Delete
*
[247] Fix | Delete
* @link https://tools.ietf.org/html/rfc3986#section-4.2
[248] Fix | Delete
*/
[249] Fix | Delete
public static function isAbsolutePathReference(UriInterface $uri)
[250] Fix | Delete
{
[251] Fix | Delete
return $uri->getScheme() === ''
[252] Fix | Delete
&& $uri->getAuthority() === ''
[253] Fix | Delete
&& isset($uri->getPath()[0])
[254] Fix | Delete
&& $uri->getPath()[0] === '/';
[255] Fix | Delete
}
[256] Fix | Delete
[257] Fix | Delete
/**
[258] Fix | Delete
* Whether the URI is a relative-path reference.
[259] Fix | Delete
*
[260] Fix | Delete
* A relative reference that does not begin with a slash character is termed a relative-path reference.
[261] Fix | Delete
*
[262] Fix | Delete
* @param UriInterface $uri
[263] Fix | Delete
*
[264] Fix | Delete
* @return bool
[265] Fix | Delete
*
[266] Fix | Delete
* @link https://tools.ietf.org/html/rfc3986#section-4.2
[267] Fix | Delete
*/
[268] Fix | Delete
public static function isRelativePathReference(UriInterface $uri)
[269] Fix | Delete
{
[270] Fix | Delete
return $uri->getScheme() === ''
[271] Fix | Delete
&& $uri->getAuthority() === ''
[272] Fix | Delete
&& (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/');
[273] Fix | Delete
}
[274] Fix | Delete
[275] Fix | Delete
/**
[276] Fix | Delete
* Whether the URI is a same-document reference.
[277] Fix | Delete
*
[278] Fix | Delete
* A same-document reference refers to a URI that is, aside from its fragment
[279] Fix | Delete
* component, identical to the base URI. When no base URI is given, only an empty
[280] Fix | Delete
* URI reference (apart from its fragment) is considered a same-document reference.
[281] Fix | Delete
*
[282] Fix | Delete
* @param UriInterface $uri The URI to check
[283] Fix | Delete
* @param UriInterface|null $base An optional base URI to compare against
[284] Fix | Delete
*
[285] Fix | Delete
* @return bool
[286] Fix | Delete
*
[287] Fix | Delete
* @link https://tools.ietf.org/html/rfc3986#section-4.4
[288] Fix | Delete
*/
[289] Fix | Delete
public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null)
[290] Fix | Delete
{
[291] Fix | Delete
if ($base !== null) {
[292] Fix | Delete
$uri = UriResolver::resolve($base, $uri);
[293] Fix | Delete
[294] Fix | Delete
return ($uri->getScheme() === $base->getScheme())
[295] Fix | Delete
&& ($uri->getAuthority() === $base->getAuthority())
[296] Fix | Delete
&& ($uri->getPath() === $base->getPath())
[297] Fix | Delete
&& ($uri->getQuery() === $base->getQuery());
[298] Fix | Delete
}
[299] Fix | Delete
[300] Fix | Delete
return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === '';
[301] Fix | Delete
}
[302] Fix | Delete
[303] Fix | Delete
/**
[304] Fix | Delete
* Removes dot segments from a path and returns the new path.
[305] Fix | Delete
*
[306] Fix | Delete
* @param string $path
[307] Fix | Delete
*
[308] Fix | Delete
* @return string
[309] Fix | Delete
*
[310] Fix | Delete
* @deprecated since version 1.4. Use UriResolver::removeDotSegments instead.
[311] Fix | Delete
* @see UriResolver::removeDotSegments
[312] Fix | Delete
*/
[313] Fix | Delete
public static function removeDotSegments($path)
[314] Fix | Delete
{
[315] Fix | Delete
return UriResolver::removeDotSegments($path);
[316] Fix | Delete
}
[317] Fix | Delete
[318] Fix | Delete
/**
[319] Fix | Delete
* Converts the relative URI into a new URI that is resolved against the base URI.
[320] Fix | Delete
*
[321] Fix | Delete
* @param UriInterface $base Base URI
[322] Fix | Delete
* @param string|UriInterface $rel Relative URI
[323] Fix | Delete
*
[324] Fix | Delete
* @return UriInterface
[325] Fix | Delete
*
[326] Fix | Delete
* @deprecated since version 1.4. Use UriResolver::resolve instead.
[327] Fix | Delete
* @see UriResolver::resolve
[328] Fix | Delete
*/
[329] Fix | Delete
public static function resolve(UriInterface $base, $rel)
[330] Fix | Delete
{
[331] Fix | Delete
if (!($rel instanceof UriInterface)) {
[332] Fix | Delete
$rel = new self($rel);
[333] Fix | Delete
}
[334] Fix | Delete
[335] Fix | Delete
return UriResolver::resolve($base, $rel);
[336] Fix | Delete
}
[337] Fix | Delete
[338] Fix | Delete
/**
[339] Fix | Delete
* Creates a new URI with a specific query string value removed.
[340] Fix | Delete
*
[341] Fix | Delete
* Any existing query string values that exactly match the provided key are
[342] Fix | Delete
* removed.
[343] Fix | Delete
*
[344] Fix | Delete
* @param UriInterface $uri URI to use as a base.
[345] Fix | Delete
* @param string $key Query string key to remove.
[346] Fix | Delete
*
[347] Fix | Delete
* @return UriInterface
[348] Fix | Delete
*/
[349] Fix | Delete
public static function withoutQueryValue(UriInterface $uri, $key)
[350] Fix | Delete
{
[351] Fix | Delete
$result = self::getFilteredQueryString($uri, [$key]);
[352] Fix | Delete
[353] Fix | Delete
return $uri->withQuery(implode('&', $result));
[354] Fix | Delete
}
[355] Fix | Delete
[356] Fix | Delete
/**
[357] Fix | Delete
* Creates a new URI with a specific query string value.
[358] Fix | Delete
*
[359] Fix | Delete
* Any existing query string values that exactly match the provided key are
[360] Fix | Delete
* removed and replaced with the given key value pair.
[361] Fix | Delete
*
[362] Fix | Delete
* A value of null will set the query string key without a value, e.g. "key"
[363] Fix | Delete
* instead of "key=value".
[364] Fix | Delete
*
[365] Fix | Delete
* @param UriInterface $uri URI to use as a base.
[366] Fix | Delete
* @param string $key Key to set.
[367] Fix | Delete
* @param string|null $value Value to set
[368] Fix | Delete
*
[369] Fix | Delete
* @return UriInterface
[370] Fix | Delete
*/
[371] Fix | Delete
public static function withQueryValue(UriInterface $uri, $key, $value)
[372] Fix | Delete
{
[373] Fix | Delete
$result = self::getFilteredQueryString($uri, [$key]);
[374] Fix | Delete
[375] Fix | Delete
$result[] = self::generateQueryString($key, $value);
[376] Fix | Delete
[377] Fix | Delete
return $uri->withQuery(implode('&', $result));
[378] Fix | Delete
}
[379] Fix | Delete
[380] Fix | Delete
/**
[381] Fix | Delete
* Creates a new URI with multiple specific query string values.
[382] Fix | Delete
*
[383] Fix | Delete
* It has the same behavior as withQueryValue() but for an associative array of key => value.
[384] Fix | Delete
*
[385] Fix | Delete
* @param UriInterface $uri URI to use as a base.
[386] Fix | Delete
* @param array $keyValueArray Associative array of key and values
[387] Fix | Delete
*
[388] Fix | Delete
* @return UriInterface
[389] Fix | Delete
*/
[390] Fix | Delete
public static function withQueryValues(UriInterface $uri, array $keyValueArray)
[391] Fix | Delete
{
[392] Fix | Delete
$result = self::getFilteredQueryString($uri, array_keys($keyValueArray));
[393] Fix | Delete
[394] Fix | Delete
foreach ($keyValueArray as $key => $value) {
[395] Fix | Delete
$result[] = self::generateQueryString($key, $value);
[396] Fix | Delete
}
[397] Fix | Delete
[398] Fix | Delete
return $uri->withQuery(implode('&', $result));
[399] Fix | Delete
}
[400] Fix | Delete
[401] Fix | Delete
/**
[402] Fix | Delete
* Creates a URI from a hash of `parse_url` components.
[403] Fix | Delete
*
[404] Fix | Delete
* @param array $parts
[405] Fix | Delete
*
[406] Fix | Delete
* @return UriInterface
[407] Fix | Delete
*
[408] Fix | Delete
* @link http://php.net/manual/en/function.parse-url.php
[409] Fix | Delete
*
[410] Fix | Delete
* @throws \InvalidArgumentException If the components do not form a valid URI.
[411] Fix | Delete
*/
[412] Fix | Delete
public static function fromParts(array $parts)
[413] Fix | Delete
{
[414] Fix | Delete
$uri = new self();
[415] Fix | Delete
$uri->applyParts($parts);
[416] Fix | Delete
$uri->validateState();
[417] Fix | Delete
[418] Fix | Delete
return $uri;
[419] Fix | Delete
}
[420] Fix | Delete
[421] Fix | Delete
public function getScheme()
[422] Fix | Delete
{
[423] Fix | Delete
return $this->scheme;
[424] Fix | Delete
}
[425] Fix | Delete
[426] Fix | Delete
public function getAuthority()
[427] Fix | Delete
{
[428] Fix | Delete
$authority = $this->host;
[429] Fix | Delete
if ($this->userInfo !== '') {
[430] Fix | Delete
$authority = $this->userInfo . '@' . $authority;
[431] Fix | Delete
}
[432] Fix | Delete
[433] Fix | Delete
if ($this->port !== null) {
[434] Fix | Delete
$authority .= ':' . $this->port;
[435] Fix | Delete
}
[436] Fix | Delete
[437] Fix | Delete
return $authority;
[438] Fix | Delete
}
[439] Fix | Delete
[440] Fix | Delete
public function getUserInfo()
[441] Fix | Delete
{
[442] Fix | Delete
return $this->userInfo;
[443] Fix | Delete
}
[444] Fix | Delete
[445] Fix | Delete
public function getHost()
[446] Fix | Delete
{
[447] Fix | Delete
return $this->host;
[448] Fix | Delete
}
[449] Fix | Delete
[450] Fix | Delete
public function getPort()
[451] Fix | Delete
{
[452] Fix | Delete
return $this->port;
[453] Fix | Delete
}
[454] Fix | Delete
[455] Fix | Delete
public function getPath()
[456] Fix | Delete
{
[457] Fix | Delete
return $this->path;
[458] Fix | Delete
}
[459] Fix | Delete
[460] Fix | Delete
public function getQuery()
[461] Fix | Delete
{
[462] Fix | Delete
return $this->query;
[463] Fix | Delete
}
[464] Fix | Delete
[465] Fix | Delete
public function getFragment()
[466] Fix | Delete
{
[467] Fix | Delete
return $this->fragment;
[468] Fix | Delete
}
[469] Fix | Delete
[470] Fix | Delete
public function withScheme($scheme)
[471] Fix | Delete
{
[472] Fix | Delete
$scheme = $this->filterScheme($scheme);
[473] Fix | Delete
[474] Fix | Delete
if ($this->scheme === $scheme) {
[475] Fix | Delete
return $this;
[476] Fix | Delete
}
[477] Fix | Delete
[478] Fix | Delete
$new = clone $this;
[479] Fix | Delete
$new->scheme = $scheme;
[480] Fix | Delete
$new->removeDefaultPort();
[481] Fix | Delete
$new->validateState();
[482] Fix | Delete
[483] Fix | Delete
return $new;
[484] Fix | Delete
}
[485] Fix | Delete
[486] Fix | Delete
public function withUserInfo($user, $password = null)
[487] Fix | Delete
{
[488] Fix | Delete
$info = $this->filterUserInfoComponent($user);
[489] Fix | Delete
if ($password !== null) {
[490] Fix | Delete
$info .= ':' . $this->filterUserInfoComponent($password);
[491] Fix | Delete
}
[492] Fix | Delete
[493] Fix | Delete
if ($this->userInfo === $info) {
[494] Fix | Delete
return $this;
[495] Fix | Delete
}
[496] Fix | Delete
[497] Fix | Delete
$new = clone $this;
[498] Fix | Delete
$new->userInfo = $info;
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function