External Libraries: Update the SimplePie library to version 1.5.6.

This version fixes a handful of PHP 8 compatibility issues.

A full list of changes included in this update can be found on GitHub: https://github.com/simplepie/simplepie/compare/1.5.5...1.5.6.

Props jrf, ayeshrajans.
Fixes #51521.
Built from https://develop.svn.wordpress.org/trunk@49176


git-svn-id: http://core.svn.wordpress.org/trunk@48938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2020-10-16 17:20:07 +00:00
parent c72bd8c75c
commit fd1c2cb401
6 changed files with 10 additions and 14 deletions

View File

@ -150,7 +150,7 @@ class SimplePie_Content_Type_Sniffer
}
elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body))
{
return 'application/octect-stream';
return 'application/octet-stream';
}
return 'text/plain';

View File

@ -109,11 +109,6 @@ class SimplePie_File
curl_setopt($fp, CURLOPT_REFERER, $url);
curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
if (!ini_get('open_basedir') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>='))
{
curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects);
}
foreach ($curl_options as $curl_param => $curl_value) {
curl_setopt($fp, $curl_param, $curl_value);
}
@ -148,7 +143,7 @@ class SimplePie_File
$this->redirects++;
$location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
$previousStatusCode = $this->status_code;
$this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen);
$this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options);
$this->permanent_url = ($previousStatusCode == 301) ? $location : $url;
return;
}
@ -233,7 +228,7 @@ class SimplePie_File
$this->redirects++;
$location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
$previousStatusCode = $this->status_code;
$this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen);
$this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options);
$this->permanent_url = ($previousStatusCode == 301) ? $location : $url;
return;
}

View File

@ -94,7 +94,7 @@ class SimplePie_Locator
$this->registry = $registry;
}
public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working)
public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working = null)
{
if ($this->is_feed($this->file))
{

View File

@ -364,11 +364,12 @@ class SimplePie_Misc
}
// Check that the encoding is supported
if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80")
if (!in_array($input, mb_list_encodings()))
{
return false;
}
if (!in_array($input, mb_list_encodings()))
if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80")
{
return false;
}

View File

@ -68,7 +68,7 @@ spl_autoload_register( 'wp_simplepie_autoload' );
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.5.5
* @version 1.5.6
* @copyright 2004-2017 Ryan Parman, Sam Sneddon, Ryan McCue
* @author Ryan Parman
* @author Sam Sneddon
@ -85,7 +85,7 @@ define('SIMPLEPIE_NAME', 'SimplePie');
/**
* SimplePie Version
*/
define('SIMPLEPIE_VERSION', '1.5.5');
define('SIMPLEPIE_VERSION', '1.5.6');
/**
* SimplePie Build

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-alpha-49175';
$wp_version = '5.6-alpha-49176';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.