aboutsummaryrefslogtreecommitdiff
path: root/lib/SimplePie
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2020-10-03 15:18:44 +0200
committerGravatar GitHub <noreply@github.com> 2020-10-03 15:18:44 +0200
commit8ec2b257df4a946d23a4f4f5ccf0b9c3affcff20 (patch)
treec399d52efbeb55e18985f02d081dd920966baf53 /lib/SimplePie
parent83166a9f5d1d06a81bf22f05ff1131ba29ef1ce6 (diff)
Update SimplePie (PHP8) (#3206)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/3082 Includes https://github.com/FreshRSS/FreshRSS/pull/3180 Differences: https://github.com/simplepie/simplepie/compare/aaad78e6da098e14bec4fec552b3a2dbca7a2d45...692e8bc19bc4aca20b57474cca2a1d234ce89d63
Diffstat (limited to 'lib/SimplePie')
-rw-r--r--lib/SimplePie/SimplePie.php6
-rw-r--r--lib/SimplePie/SimplePie/File.php5
-rw-r--r--lib/SimplePie/SimplePie/Item.php2
-rw-r--r--lib/SimplePie/SimplePie/Locator.php2
-rw-r--r--lib/SimplePie/SimplePie/Misc.php5
5 files changed, 8 insertions, 12 deletions
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.php
index 76435cd0c..bce6c56ac 100644
--- a/lib/SimplePie/SimplePie.php
+++ b/lib/SimplePie/SimplePie.php
@@ -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']))
{
diff --git a/lib/SimplePie/SimplePie/File.php b/lib/SimplePie/SimplePie/File.php
index 1fcbde49b..7c7078cc5 100644
--- a/lib/SimplePie/SimplePie/File.php
+++ b/lib/SimplePie/SimplePie/File.php
@@ -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);
}
diff --git a/lib/SimplePie/SimplePie/Item.php b/lib/SimplePie/SimplePie/Item.php
index 729c28d20..5be6b1994 100644
--- a/lib/SimplePie/SimplePie/Item.php
+++ b/lib/SimplePie/SimplePie/Item.php
@@ -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);
}
diff --git a/lib/SimplePie/SimplePie/Locator.php b/lib/SimplePie/SimplePie/Locator.php
index bf7c21a6f..a207df6fe 100644
--- a/lib/SimplePie/SimplePie/Locator.php
+++ b/lib/SimplePie/SimplePie/Locator.php
@@ -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))
{
diff --git a/lib/SimplePie/SimplePie/Misc.php b/lib/SimplePie/SimplePie/Misc.php
index 4f8e7658f..8167ad2fb 100644
--- a/lib/SimplePie/SimplePie/Misc.php
+++ b/lib/SimplePie/SimplePie/Misc.php
@@ -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;
}