mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-05 07:58:35 +01:00
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:
parent
c72bd8c75c
commit
fd1c2cb401
@ -150,7 +150,7 @@ class SimplePie_Content_Type_Sniffer
|
|||||||
}
|
}
|
||||||
elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body))
|
elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body))
|
||||||
{
|
{
|
||||||
return 'application/octect-stream';
|
return 'application/octet-stream';
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'text/plain';
|
return 'text/plain';
|
||||||
|
@ -109,11 +109,6 @@ class SimplePie_File
|
|||||||
curl_setopt($fp, CURLOPT_REFERER, $url);
|
curl_setopt($fp, CURLOPT_REFERER, $url);
|
||||||
curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
|
curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
|
||||||
curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
|
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) {
|
foreach ($curl_options as $curl_param => $curl_value) {
|
||||||
curl_setopt($fp, $curl_param, $curl_value);
|
curl_setopt($fp, $curl_param, $curl_value);
|
||||||
}
|
}
|
||||||
@ -148,7 +143,7 @@ class SimplePie_File
|
|||||||
$this->redirects++;
|
$this->redirects++;
|
||||||
$location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
|
$location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
|
||||||
$previousStatusCode = $this->status_code;
|
$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;
|
$this->permanent_url = ($previousStatusCode == 301) ? $location : $url;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -233,7 +228,7 @@ class SimplePie_File
|
|||||||
$this->redirects++;
|
$this->redirects++;
|
||||||
$location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
|
$location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
|
||||||
$previousStatusCode = $this->status_code;
|
$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;
|
$this->permanent_url = ($previousStatusCode == 301) ? $location : $url;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ class SimplePie_Locator
|
|||||||
$this->registry = $registry;
|
$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))
|
if ($this->is_feed($this->file))
|
||||||
{
|
{
|
||||||
|
@ -364,11 +364,12 @@ class SimplePie_Misc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check that the encoding is supported
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
if (!in_array($input, mb_list_encodings()))
|
|
||||||
|
if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80")
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ spl_autoload_register( 'wp_simplepie_autoload' );
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @package SimplePie
|
* @package SimplePie
|
||||||
* @version 1.5.5
|
* @version 1.5.6
|
||||||
* @copyright 2004-2017 Ryan Parman, Sam Sneddon, Ryan McCue
|
* @copyright 2004-2017 Ryan Parman, Sam Sneddon, Ryan McCue
|
||||||
* @author Ryan Parman
|
* @author Ryan Parman
|
||||||
* @author Sam Sneddon
|
* @author Sam Sneddon
|
||||||
@ -85,7 +85,7 @@ define('SIMPLEPIE_NAME', 'SimplePie');
|
|||||||
/**
|
/**
|
||||||
* SimplePie Version
|
* SimplePie Version
|
||||||
*/
|
*/
|
||||||
define('SIMPLEPIE_VERSION', '1.5.5');
|
define('SIMPLEPIE_VERSION', '1.5.6');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SimplePie Build
|
* SimplePie Build
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user