Changeset 61769
- Timestamp:
- 02/27/2026 11:35:34 PM (2 weeks ago)
- Location:
- trunk/src/wp-includes/Requests/src
- Files:
-
- 9 edited
-
IdnaEncoder.php (modified) (1 diff)
-
Ipv6.php (modified) (1 diff)
-
Iri.php (modified) (2 diffs)
-
Requests.php (modified) (1 diff)
-
Response/Headers.php (modified) (1 diff)
-
Transport/Curl.php (modified) (2 diffs)
-
Transport/Fsockopen.php (modified) (1 diff)
-
Utility/CaseInsensitiveDictionary.php (modified) (3 diffs)
-
Utility/FilteredIterator.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/Requests/src/IdnaEncoder.php
r55629 r61769 217 217 218 218 if (// Non-shortest form sequences are invalid 219 $length > 1 && $character <= 0x7F220 || $length > 2 && $character <= 0x7FF221 || $length > 3 && $character <= 0xFFFF219 ($length > 1 && $character <= 0x7F) 220 || ($length > 2 && $character <= 0x7FF) 221 || ($length > 3 && $character <= 0xFFFF) 222 222 // Outside of range of ucschar codepoints 223 223 // Noncharacters 224 224 || ($character & 0xFFFE) === 0xFFFE 225 || $character >= 0xFDD0 && $character <= 0xFDEF225 || ($character >= 0xFDD0 && $character <= 0xFDEF) 226 226 || ( 227 227 // Everything else not in ucschar 228 $character > 0xD7FF && $character < 0xF900228 ($character > 0xD7FF && $character < 0xF900) 229 229 || $character < 0x20 230 || $character > 0x7E && $character < 0xA0230 || ($character > 0x7E && $character < 0xA0) 231 231 || $character > 0xEFFFD 232 232 ) -
trunk/src/wp-includes/Requests/src/Ipv6.php
r54997 r61769 162 162 $ipv6 = explode(':', $ipv6); 163 163 $ipv4 = explode('.', $ipv4); 164 if ( count($ipv6) === 8 && count($ipv4) === 1 || count($ipv6) === 6 && count($ipv4) === 4) {164 if ((count($ipv6) === 8 && count($ipv4) === 1) || (count($ipv6) === 6 && count($ipv4) === 4)) { 165 165 foreach ($ipv6 as $ipv6_part) { 166 166 // The section can't be empty -
trunk/src/wp-includes/Requests/src/Iri.php
r56835 r61769 215 215 } 216 216 217 if ($return === null && isset($this-> normalization[$this->scheme][$name])) {217 if ($return === null && isset($this->scheme, $this->normalization[$this->scheme][$name])) { 218 218 return $this->normalization[$this->scheme][$name]; 219 219 } … … 670 670 671 671 protected function scheme_normalization() { 672 if (isset($this->normalization[$this->scheme]['iuserinfo']) && $this->iuserinfo === $this->normalization[$this->scheme]['iuserinfo']) { 673 $this->iuserinfo = null; 674 } 675 if (isset($this->normalization[$this->scheme]['ihost']) && $this->ihost === $this->normalization[$this->scheme]['ihost']) { 676 $this->ihost = null; 677 } 678 if (isset($this->normalization[$this->scheme]['port']) && $this->port === $this->normalization[$this->scheme]['port']) { 679 $this->port = null; 680 } 681 if (isset($this->normalization[$this->scheme]['ipath']) && $this->ipath === $this->normalization[$this->scheme]['ipath']) { 682 $this->ipath = ''; 672 if (isset($this->scheme, $this->normalization[$this->scheme])) { 673 if (isset($this->normalization[$this->scheme]['iuserinfo']) && $this->iuserinfo === $this->normalization[$this->scheme]['iuserinfo']) { 674 $this->iuserinfo = null; 675 } 676 if (isset($this->normalization[$this->scheme]['ihost']) && $this->ihost === $this->normalization[$this->scheme]['ihost']) { 677 $this->ihost = null; 678 } 679 if (isset($this->normalization[$this->scheme]['port']) && $this->port === $this->normalization[$this->scheme]['port']) { 680 $this->port = null; 681 } 682 if (isset($this->normalization[$this->scheme]['ipath']) && $this->ipath === $this->normalization[$this->scheme]['ipath']) { 683 $this->ipath = ''; 684 } 685 if (isset($this->normalization[$this->scheme]['iquery']) && $this->iquery === $this->normalization[$this->scheme]['iquery']) { 686 $this->iquery = null; 687 } 688 if (isset($this->normalization[$this->scheme]['ifragment']) && $this->ifragment === $this->normalization[$this->scheme]['ifragment']) { 689 $this->ifragment = null; 690 } 683 691 } 684 692 if (isset($this->ihost) && empty($this->ipath)) { 685 693 $this->ipath = '/'; 686 }687 if (isset($this->normalization[$this->scheme]['iquery']) && $this->iquery === $this->normalization[$this->scheme]['iquery']) {688 $this->iquery = null;689 }690 if (isset($this->normalization[$this->scheme]['ifragment']) && $this->ifragment === $this->normalization[$this->scheme]['ifragment']) {691 $this->ifragment = null;692 694 } 693 695 } -
trunk/src/wp-includes/Requests/src/Requests.php
r57876 r61769 149 149 * @var string 150 150 */ 151 const VERSION = '2.0.1 1';151 const VERSION = '2.0.17'; 152 152 153 153 /** -
trunk/src/wp-includes/Requests/src/Response/Headers.php
r55629 r61769 36 36 } 37 37 38 if (!isset($ this->data[$offset])) {38 if (!isset($offset, $this->data[$offset])) { 39 39 return null; 40 40 } -
trunk/src/wp-includes/Requests/src/Transport/Curl.php
r57086 r61769 127 127 public function __destruct() { 128 128 if (is_resource($this->handle)) { 129 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated,Generic.PHP.DeprecatedFunctions.Deprecated 129 130 curl_close($this->handle); 130 131 } … … 307 308 308 309 curl_multi_remove_handle($multihandle, $done['handle']); 309 curl_close($done['handle']); 310 if (is_resource($done['handle'])) { 311 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated,Generic.PHP.DeprecatedFunctions.Deprecated 312 curl_close($done['handle']); 313 } 310 314 311 315 if (!is_string($responses[$key])) { -
trunk/src/wp-includes/Requests/src/Transport/Fsockopen.php
r57876 r61769 149 149 if (function_exists('stream_context_set_options')) { 150 150 // PHP 8.3+. 151 // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.stream_context_set_optionsFound 151 152 stream_context_set_options($context, ['ssl' => $context_options]); 152 153 } else { 153 154 // PHP < 8.3. 155 // phpcs:ignore PHPCompatibility.FunctionUse.OptionalToRequiredFunctionParameters 154 156 stream_context_set_option($context, ['ssl' => $context_options]); 155 157 } -
trunk/src/wp-includes/Requests/src/Utility/CaseInsensitiveDictionary.php
r55629 r61769 50 50 } 51 51 52 if ($offset === null) { 53 $offset = ''; 54 } 55 52 56 return isset($this->data[$offset]); 53 57 } … … 63 67 if (is_string($offset)) { 64 68 $offset = strtolower($offset); 69 } 70 71 if ($offset === null) { 72 $offset = ''; 65 73 } 66 74 … … 104 112 } 105 113 114 if ($offset === null) { 115 $offset = ''; 116 } 117 106 118 unset($this->data[$offset]); 107 119 } -
trunk/src/wp-includes/Requests/src/Utility/FilteredIterator.php
r55629 r61769 29 29 * Create a new iterator 30 30 * 31 * @param array $data The array or objectto be iterated on.31 * @param array $data The array to be iterated on. 32 32 * @param callable $callback Callback to be called on each value 33 33 * … … 35 35 */ 36 36 public function __construct($data, $callback) { 37 if ( InputValidator::is_iterable($data) === false) {37 if (is_object($data) === true || InputValidator::is_iterable($data) === false) { 38 38 throw InvalidArgument::create(1, '$data', 'iterable', gettype($data)); 39 39 }
Note: See TracChangeset
for help on using the changeset viewer.