mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-04 05:03:38 -04:00
Update SimplePie (PHP8) (#3206)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/3082
Includes https://github.com/FreshRSS/FreshRSS/pull/3180
Differences:
aaad78e6da...692e8bc19b
This commit is contained in:
committed by
GitHub
parent
83166a9f5d
commit
8ec2b257df
@@ -33,7 +33,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @package SimplePie
|
||||
* @version 1.5.4
|
||||
* @version 1.5.5
|
||||
* @copyright 2004-2017 Ryan Parman, Sam Sneddon, Ryan McCue
|
||||
* @author Ryan Parman
|
||||
* @author Sam Sneddon
|
||||
@@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie');
|
||||
/**
|
||||
* SimplePie Version
|
||||
*/
|
||||
define('SIMPLEPIE_VERSION', '1.5.4');
|
||||
define('SIMPLEPIE_VERSION', '1.5.5');
|
||||
|
||||
/**
|
||||
* SimplePie Build
|
||||
@@ -718,7 +718,7 @@ class SimplePie
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
if ((version_compare(PHP_VERSION, '5.6', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode'))
|
||||
if (!gc_enabled())
|
||||
{
|
||||
if (!empty($this->data['items']))
|
||||
{
|
||||
|
||||
@@ -113,11 +113,6 @@ class SimplePie_File
|
||||
curl_setopt($fp, CURLOPT_REFERER, SimplePie_Misc::url_remove_credentials($url));
|
||||
curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
|
||||
curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
|
||||
//if (!ini_get('open_basedir') && !ini_get('safe_mode') && 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);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ class SimplePie_Item
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
if ((version_compare(PHP_VERSION, '5.6', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode'))
|
||||
if (!gc_enabled())
|
||||
{
|
||||
unset($this->feed);
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -368,11 +368,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user