Make WordPress Core


Ignore:
Timestamp:
05/11/2021 07:40:41 PM (4 years ago)
Author:
desrosj
Message:

External Libraries: Update the Requests library to version 1.8.0.

While some of the changes in the 1.8.0 release have already been copied to WordPress Core in earlier releases (see [38727], [46258], [47902] and [49382]), this release contains additional improvements, including:

  • A significant performance fix when using cURL.
  • Improved compliance with RFC2616.

The library has also been moved under the WordPress project’s GitHub organization and can now be found at https://github.com/WordPress/Requests.

Props jrf, dd32, rmccue, justinahinon, netweb, schlessera, TimothyBJacobs, soulseekah, ozh, skithund, carlalexander, travisnorthcutt, desrosj.
Fixes #53101.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/Requests/Utility/FilteredIterator.php

    r49382 r50842  
    4040    public function current() {
    4141        $value = parent::current();
    42         $value = call_user_func($this->callback, $value);
     42
     43        if (is_callable($this->callback)) {
     44            $value = call_user_func($this->callback, $value);
     45        }
     46
    4347        return $value;
    4448    }
     
    4751     * @inheritdoc
    4852     */
    49     public function unserialize( $serialized ) {
    50     }
     53    public function unserialize($serialized) {}
    5154
    5255    /**
    5356     * @inheritdoc
     57     *
     58     * @phpcs:disable PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound
    5459     */
    55     public function __unserialize( $serialized ) { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound
    56     }
     60    public function __unserialize($serialized) {}
    5761
    58     public function __wakeup() { // phpcs:ignore PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__wakeupFound
    59         unset( $this->callback );
     62    public function __wakeup() {
     63        unset($this->callback);
    6064    }
    6165}
Note: See TracChangeset for help on using the changeset viewer.