A free, self-hostable news aggregator…
Update SimplePie (PHP8) (#3206)
Alexandre Alapetite8ec2b257df4a
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.phpindex 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.phpindex 1fcbde49b..7c7078cc5 100644--- a/lib/SimplePie/SimplePie/File.php+++ b/lib/SimplePie/SimplePie/File.php@@ -113,11 +113,6 @@ class SimplePie_Filecurl_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.phpindex 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.phpindex 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.phpindex 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;}