From d9b262348facf0f5591a73a8f2518ea9e837691e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 20 Feb 2025 11:29:06 +0100 Subject: update composer libs --- vendor/simplepie/simplepie/.php-cs-fixer.dist.php | 2 ++ vendor/simplepie/simplepie/CHANGELOG.md | 17 ++++++++++++- vendor/simplepie/simplepie/README.markdown | 16 +++++++++++++ vendor/simplepie/simplepie/autoloader.php | 2 +- vendor/simplepie/simplepie/composer.json | 1 + vendor/simplepie/simplepie/library/SimplePie.php | 1 - .../simplepie/library/SimplePie/Author.php | 1 - .../simplepie/library/SimplePie/Cache.php | 1 - .../simplepie/library/SimplePie/Cache/Base.php | 1 - .../simplepie/library/SimplePie/Cache/DB.php | 1 - .../simplepie/library/SimplePie/Cache/File.php | 1 - .../simplepie/library/SimplePie/Cache/Memcache.php | 1 - .../library/SimplePie/Cache/Memcached.php | 1 - .../simplepie/library/SimplePie/Cache/MySQL.php | 1 - .../simplepie/library/SimplePie/Cache/Redis.php | 2 -- .../simplepie/library/SimplePie/Caption.php | 1 - .../simplepie/library/SimplePie/Category.php | 1 - .../library/SimplePie/Content/Type/Sniffer.php | 1 - .../simplepie/library/SimplePie/Copyright.php | 1 - .../simplepie/simplepie/library/SimplePie/Core.php | 1 - .../simplepie/library/SimplePie/Credit.php | 1 - .../library/SimplePie/Decode/HTML/Entities.php | 1 - .../simplepie/library/SimplePie/Enclosure.php | 1 - .../simplepie/library/SimplePie/Exception.php | 1 - .../simplepie/simplepie/library/SimplePie/File.php | 1 - .../simplepie/library/SimplePie/HTTP/Parser.php | 1 - .../simplepie/simplepie/library/SimplePie/IRI.php | 1 - .../simplepie/simplepie/library/SimplePie/Item.php | 1 - .../simplepie/library/SimplePie/Locator.php | 1 - .../simplepie/simplepie/library/SimplePie/Misc.php | 1 - .../simplepie/library/SimplePie/Net/IPv6.php | 1 - .../simplepie/library/SimplePie/Parse/Date.php | 1 - .../simplepie/library/SimplePie/Parser.php | 1 - .../simplepie/library/SimplePie/Rating.php | 1 - .../simplepie/library/SimplePie/Registry.php | 1 - .../simplepie/library/SimplePie/Restriction.php | 1 - .../simplepie/library/SimplePie/Sanitize.php | 1 - .../simplepie/library/SimplePie/Source.php | 1 - .../library/SimplePie/XML/Declaration/Parser.php | 1 - .../simplepie/library/SimplePie/gzdecode.php | 1 - vendor/simplepie/simplepie/src/Author.php | 1 - vendor/simplepie/simplepie/src/Cache.php | 1 - vendor/simplepie/simplepie/src/Cache/Base.php | 1 - .../simplepie/src/Cache/BaseDataCache.php | 5 ++-- vendor/simplepie/simplepie/src/Cache/DB.php | 9 ++++--- vendor/simplepie/simplepie/src/Cache/DataCache.php | 1 - vendor/simplepie/simplepie/src/Cache/File.php | 1 - vendor/simplepie/simplepie/src/Cache/Memcache.php | 1 - vendor/simplepie/simplepie/src/Cache/Memcached.php | 1 - vendor/simplepie/simplepie/src/Cache/MySQL.php | 9 ++++--- vendor/simplepie/simplepie/src/Cache/Psr16.php | 3 +-- vendor/simplepie/simplepie/src/Cache/Redis.php | 1 - vendor/simplepie/simplepie/src/Caption.php | 1 - vendor/simplepie/simplepie/src/Category.php | 1 - .../simplepie/src/Content/Type/Sniffer.php | 1 - vendor/simplepie/simplepie/src/Copyright.php | 1 - vendor/simplepie/simplepie/src/Credit.php | 1 - vendor/simplepie/simplepie/src/Enclosure.php | 17 +++++++------ vendor/simplepie/simplepie/src/Exception.php | 1 - vendor/simplepie/simplepie/src/File.php | 1 - vendor/simplepie/simplepie/src/Gzdecode.php | 3 +-- vendor/simplepie/simplepie/src/HTTP/Parser.php | 1 - vendor/simplepie/simplepie/src/IRI.php | 1 - vendor/simplepie/simplepie/src/Item.php | 7 +++--- vendor/simplepie/simplepie/src/Locator.php | 1 - vendor/simplepie/simplepie/src/Misc.php | 1 - vendor/simplepie/simplepie/src/Net/IPv6.php | 1 - vendor/simplepie/simplepie/src/Parse/Date.php | 1 - vendor/simplepie/simplepie/src/Parser.php | 12 ++++------ vendor/simplepie/simplepie/src/Rating.php | 1 - vendor/simplepie/simplepie/src/Registry.php | 5 ++-- vendor/simplepie/simplepie/src/RegistryAware.php | 1 - vendor/simplepie/simplepie/src/Restriction.php | 1 - vendor/simplepie/simplepie/src/Sanitize.php | 17 +++++-------- vendor/simplepie/simplepie/src/SimplePie.php | 28 ++++++++++------------ vendor/simplepie/simplepie/src/Source.php | 7 +++--- .../simplepie/src/XML/Declaration/Parser.php | 1 - 77 files changed, 88 insertions(+), 133 deletions(-) (limited to 'vendor/simplepie') diff --git a/vendor/simplepie/simplepie/.php-cs-fixer.dist.php b/vendor/simplepie/simplepie/.php-cs-fixer.dist.php index d26f7c6c6..ed111568f 100644 --- a/vendor/simplepie/simplepie/.php-cs-fixer.dist.php +++ b/vendor/simplepie/simplepie/.php-cs-fixer.dist.php @@ -14,6 +14,8 @@ return (new PhpCsFixer\Config()) '@PHP71Migration:risky' => true, 'void_return' => false, '@PHPUnit84Migration:risky' => true, + 'declare_strict_types' => false, ]) + ->setRiskyAllowed(true) ->setFinder($finder) ; diff --git a/vendor/simplepie/simplepie/CHANGELOG.md b/vendor/simplepie/simplepie/CHANGELOG.md index dba92bbf7..afc58588b 100644 --- a/vendor/simplepie/simplepie/CHANGELOG.md +++ b/vendor/simplepie/simplepie/CHANGELOG.md @@ -5,7 +5,22 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/simplepie/simplepie/compare/1.8.0...master) +## [Unreleased](https://github.com/simplepie/simplepie/compare/1.8.1...one-dot-eight) + +Nothing yet. + +## [1.8.1](https://github.com/simplepie/simplepie/compare/1.8.0...1.8.1) - 2024-10-01 + +### Changed + +- Disable Composer lockfile by @jrfnl in [#887](https://github.com/simplepie/simplepie/pull/887), backported in [#895](https://github.com/simplepie/simplepie/pull/895) + +### Fixed + +- Fixes for PHP 8.4 deprecations by @Girgias, @jrfnl and @jtojnar, backported in [#875](https://github.com/simplepie/simplepie/pull/875) +- Fix locator with website missing `Content-Type` header by @jtojnar in [#891](https://github.com/simplepie/simplepie/pull/891) +- Fix `encode` argument of `SimplePie::strip_htmltags()` @jtojnar in [#894](https://github.com/simplepie/simplepie/pull/894), backported in [#898](https://github.com/simplepie/simplepie/pull/898) +- Reverted `strict_types` by @jtojnar in [#842](https://github.com/simplepie/simplepie/pull/842) ## [1.8.0](https://github.com/simplepie/simplepie/compare/1.7.0...1.8.0) - 2023-01-20 diff --git a/vendor/simplepie/simplepie/README.markdown b/vendor/simplepie/simplepie/README.markdown index 5500f03c2..ee8d08672 100644 --- a/vendor/simplepie/simplepie/README.markdown +++ b/vendor/simplepie/simplepie/README.markdown @@ -18,6 +18,22 @@ Requirements * PCRE support +PSR-16: Caching support +-------------- + +Since SimplePie 1.8.0 you can use the [PSR-16](https://www.php-fig.org/psr/psr-16/) cache from +[Symfony](https://symfony.com/doc/current/components/cache.html) +or [every other implementation](https://packagist.org/providers/psr/simple-cache-implementation). + +```php +$simplepie = new \SimplePie\SimplePie(); +$simplepie->set_cache( + new \Symfony\Component\Cache\Psr16Cache( + new \Symfony\Component\Cache\Adapter\FilesystemAdapter() + ), +); +``` + What comes in the package? -------------------------- 1. `src/` - SimplePie classes for use with the autoloader diff --git a/vendor/simplepie/simplepie/autoloader.php b/vendor/simplepie/simplepie/autoloader.php index a19c25476..b1635ff15 100644 --- a/vendor/simplepie/simplepie/autoloader.php +++ b/vendor/simplepie/simplepie/autoloader.php @@ -88,7 +88,7 @@ spl_autoload_register(array(new SimplePie_Autoloader(), 'autoload')); if (!class_exists('SimplePie')) { - trigger_error('Autoloader not registered properly', E_USER_ERROR); + exit('Autoloader not registered properly'); } /** diff --git a/vendor/simplepie/simplepie/composer.json b/vendor/simplepie/simplepie/composer.json index cfede2b53..f0a800c80 100644 --- a/vendor/simplepie/simplepie/composer.json +++ b/vendor/simplepie/simplepie/composer.json @@ -57,6 +57,7 @@ }, "config": { "bin-dir": "bin", + "lock": false, "sort-packages": true }, "scripts": { diff --git a/vendor/simplepie/simplepie/library/SimplePie.php b/vendor/simplepie/simplepie/library/SimplePie.php index 8a2b334e1..14f5380c2 100755 --- a/vendor/simplepie/simplepie/library/SimplePie.php +++ b/vendor/simplepie/simplepie/library/SimplePie.php @@ -1,6 +1,5 @@ cache->load(); - if (! is_array($data)) { + if (!is_array($data)) { return $default; } // ignore data if internal cache expiration time is not set - if (! array_key_exists('__cache_expiration_time', $data)) { + if (!array_key_exists('__cache_expiration_time', $data)) { return $default; } diff --git a/vendor/simplepie/simplepie/src/Cache/DB.php b/vendor/simplepie/simplepie/src/Cache/DB.php index 7994e3210..a5357b26d 100644 --- a/vendor/simplepie/simplepie/src/Cache/DB.php +++ b/vendor/simplepie/simplepie/src/Cache/DB.php @@ -1,6 +1,5 @@ data['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_10]['feed'][0])) { - $channel =& $data->data['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_10]['feed'][0]; + $channel = &$data->data['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_10]['feed'][0]; } elseif (isset($data->data['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_03]['feed'][0])) { - $channel =& $data->data['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_03]['feed'][0]; + $channel = &$data->data['child'][\SimplePie\SimplePie::NAMESPACE_ATOM_03]['feed'][0]; } elseif (isset($data->data['child'][\SimplePie\SimplePie::NAMESPACE_RDF]['RDF'][0])) { - $channel =& $data->data['child'][\SimplePie\SimplePie::NAMESPACE_RDF]['RDF'][0]; + $channel = &$data->data['child'][\SimplePie\SimplePie::NAMESPACE_RDF]['RDF'][0]; } elseif (isset($data->data['child'][\SimplePie\SimplePie::NAMESPACE_RSS_20]['rss'][0]['child'][\SimplePie\SimplePie::NAMESPACE_RSS_20]['channel'][0])) { - $channel =& $data->data['child'][\SimplePie\SimplePie::NAMESPACE_RSS_20]['rss'][0]['child'][\SimplePie\SimplePie::NAMESPACE_RSS_20]['channel'][0]; + $channel = &$data->data['child'][\SimplePie\SimplePie::NAMESPACE_RSS_20]['rss'][0]['child'][\SimplePie\SimplePie::NAMESPACE_RSS_20]['channel'][0]; } else { $channel = null; } diff --git a/vendor/simplepie/simplepie/src/Cache/DataCache.php b/vendor/simplepie/simplepie/src/Cache/DataCache.php index bf3aebe90..e75413243 100644 --- a/vendor/simplepie/simplepie/src/Cache/DataCache.php +++ b/vendor/simplepie/simplepie/src/Cache/DataCache.php @@ -1,6 +1,5 @@ cache->get($key, $default); - if (! is_array($data) || $data === $default) { + if (!is_array($data) || $data === $default) { return $default; } diff --git a/vendor/simplepie/simplepie/src/Cache/Redis.php b/vendor/simplepie/simplepie/src/Cache/Redis.php index 0effccadb..5997668c0 100644 --- a/vendor/simplepie/simplepie/src/Cache/Redis.php +++ b/vendor/simplepie/simplepie/src/Cache/Redis.php @@ -1,6 +1,5 @@ get_length(); if ($length !== null) { - return round($length/1048576, 2); + return round($length / 1048576, 2); } return null; @@ -812,7 +811,7 @@ class Enclosure * @param array|string $options See first parameter to {@see embed} * @return string HTML string to output */ - public function native_embed($options='') + public function native_embed($options = '') { return $this->embed($options, true); } @@ -943,9 +942,9 @@ class Enclosure if ($height === 'auto') { $width = 480; } elseif ($widescreen) { - $width = round((intval($height)/9)*16); + $width = round((intval($height) / 9) * 16); } else { - $width = round((intval($height)/3)*4); + $width = round((intval($height) / 3) * 4); } } else { $width = '100%'; @@ -963,9 +962,9 @@ class Enclosure $height = 360; } } elseif ($widescreen) { - $height = round((intval($width)/16)*9); + $height = round((intval($width) / 16) * 9); } else { - $height = round((intval($width)/4)*3); + $height = round((intval($width) / 4) * 3); } } else { $height = 376; @@ -1115,7 +1114,7 @@ class Enclosure $type = 'audio/x-ms-wma'; break; - // Video mime-types + // Video mime-types case '3gp': case '3gpp': $type = 'video/3gpp'; @@ -1178,7 +1177,7 @@ class Enclosure $type = 'video/x-ms-wvx'; break; - // Flash mime-types + // Flash mime-types case 'spl': $type = 'application/futuresplash'; break; diff --git a/vendor/simplepie/simplepie/src/Exception.php b/vendor/simplepie/simplepie/src/Exception.php index a20681f55..ae67ae38c 100644 --- a/vendor/simplepie/simplepie/src/Exception.php +++ b/vendor/simplepie/simplepie/src/Exception.php @@ -1,6 +1,5 @@ registry->call(Misc::class, 'is_isegment_nz_nc', [$key])) { if (isset($this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key])) { $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key]); - $this->data['links'][$key] =& $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key]; + $this->data['links'][$key] = &$this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key]; } else { - $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; + $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key] = &$this->data['links'][$key]; } } elseif (substr($key, 0, 41) === \SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY) { - $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; + $this->data['links'][substr($key, 41)] = &$this->data['links'][$key]; } $this->data['links'][$key] = array_unique($this->data['links'][$key]); } diff --git a/vendor/simplepie/simplepie/src/Locator.php b/vendor/simplepie/simplepie/src/Locator.php index 1dc005b47..e17b3a376 100644 --- a/vendor/simplepie/simplepie/src/Locator.php +++ b/vendor/simplepie/simplepie/src/Locator.php @@ -1,6 +1,5 @@ encoding, $this->separator); xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0); - xml_set_object($xml, $this); - xml_set_character_data_handler($xml, 'cdata'); - xml_set_element_handler($xml, 'tag_open', 'tag_close'); + xml_set_character_data_handler($xml, [$this, 'cdata']); + xml_set_element_handler($xml, [$this, 'tag_open'], [$this, 'tag_close']); // Parse! $wrapper = @is_writable(sys_get_temp_dir()) ? 'php://temp' : 'php://memory'; @@ -303,8 +301,8 @@ class Parser implements RegistryAware $this->data['data'] .= '>'; } } else { - $this->datas[] =& $this->data; - $this->data =& $this->data['child'][end($this->namespace)][end($this->element)][]; + $this->datas[] = &$this->data; + $this->data = &$this->data['child'][end($this->namespace)][end($this->element)][]; $this->data = ['data' => '', 'attribs' => $attribs, 'xml_base' => end($this->xml_base), 'xml_base_explicit' => end($this->xml_base_explicit), 'xml_lang' => end($this->xml_lang)]; if ((end($this->namespace) === \SimplePie\SimplePie::NAMESPACE_ATOM_03 && in_array(end($this->element), ['title', 'tagline', 'copyright', 'info', 'summary', 'content']) && isset($attribs['']['mode']) && $attribs['']['mode'] === 'xml') || (end($this->namespace) === \SimplePie\SimplePie::NAMESPACE_ATOM_10 && in_array(end($this->element), ['rights', 'subtitle', 'summary', 'info', 'title', 'content']) && isset($attribs['']['type']) && $attribs['']['type'] === 'xhtml') @@ -334,7 +332,7 @@ class Parser implements RegistryAware } } if ($this->current_xhtml_construct === -1) { - $this->data =& $this->datas[count($this->datas) - 1]; + $this->data = &$this->datas[count($this->datas) - 1]; array_pop($this->datas); } diff --git a/vendor/simplepie/simplepie/src/Rating.php b/vendor/simplepie/simplepie/src/Rating.php index f4f303d99..24c27337f 100644 --- a/vendor/simplepie/simplepie/src/Rating.php +++ b/vendor/simplepie/simplepie/src/Rating.php @@ -1,6 +1,5 @@ legacyTypes[$type]; } - if (! array_key_exists($type, $this->default)) { + if (!array_key_exists($type, $this->default)) { return false; } @@ -197,7 +196,7 @@ class Registry $type = $this->legacyTypes[$type]; } - if (! array_key_exists($type, $this->default)) { + if (!array_key_exists($type, $this->default)) { return null; } diff --git a/vendor/simplepie/simplepie/src/RegistryAware.php b/vendor/simplepie/simplepie/src/RegistryAware.php index 9d60bdd0f..525d93140 100644 --- a/vendor/simplepie/simplepie/src/RegistryAware.php +++ b/vendor/simplepie/simplepie/src/RegistryAware.php @@ -1,6 +1,5 @@ registry = $registry; } - public function pass_cache_data($enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie\Cache', DataCache $cache = null) + public function pass_cache_data($enable_cache = true, $cache_location = './cache', $cache_name_function = 'md5', $cache_class = 'SimplePie\Cache', ?DataCache $cache = null) { if (isset($enable_cache)) { $this->enable_cache = (bool) $enable_cache; @@ -143,7 +142,7 @@ class Sanitize implements RegistryAware $this->cache_location = (string) $cache_location; } - if (! is_string($cache_name_function) && ! is_object($cache_name_function) && ! $cache_name_function instanceof NameFilter) { + if (!is_string($cache_name_function) && !is_object($cache_name_function) && !$cache_name_function instanceof NameFilter) { throw new InvalidArgumentException(sprintf( '%s(): Argument #3 ($cache_name_function) must be of type %s', __METHOD__, @@ -297,7 +296,7 @@ class Sanitize implements RegistryAware foreach ($domains as $domain) { $domain = trim($domain, ". \t\n\r\0\x0B"); $segments = array_reverse(explode('.', $domain)); - $node =& $this->https_domains; + $node = &$this->https_domains; foreach ($segments as $segment) {//Build a tree if ($node === true) { break; @@ -305,7 +304,7 @@ class Sanitize implements RegistryAware if (!isset($node[$segment])) { $node[$segment] = []; } - $node =& $node[$segment]; + $node = &$node[$segment]; } $node = true; } @@ -316,16 +315,12 @@ class Sanitize implements RegistryAware */ protected function is_https_domain($domain) { - - // https://github.com/simplepie/simplepie/issues/852 - $domain = (string) $domain; - $domain = trim($domain, '. '); $segments = array_reverse(explode('.', $domain)); - $node =& $this->https_domains; + $node = &$this->https_domains; foreach ($segments as $segment) {//Explore the tree if (isset($node[$segment])) { - $node =& $node[$segment]; + $node = &$node[$segment]; } else { break; } diff --git a/vendor/simplepie/simplepie/src/SimplePie.php b/vendor/simplepie/simplepie/src/SimplePie.php index 1dfa39fad..a0f6c17f4 100644 --- a/vendor/simplepie/simplepie/src/SimplePie.php +++ b/vendor/simplepie/simplepie/src/SimplePie.php @@ -1,6 +1,5 @@ set_useragent(); @@ -803,7 +801,7 @@ class SimplePie if ($file instanceof \SimplePie\File) { $this->feed_url = $file->url; $this->permanent_url = $this->feed_url; - $this->file =& $file; + $this->file = &$file; return true; } return false; @@ -1375,7 +1373,7 @@ class SimplePie } $this->sanitize->strip_htmltags($tags); if ($encode !== null) { - $this->sanitize->encode_instead_of_strip($tags); + $this->sanitize->encode_instead_of_strip($encode); } } @@ -1666,7 +1664,7 @@ class SimplePie // Cache the file if caching is enabled $this->data['cache_expiration_time'] = $this->cache_duration + time(); - if ($cache && ! $cache->set_data($this->get_cache_filename($this->feed_url), $this->data, $this->cache_duration)) { + if ($cache && !$cache->set_data($this->get_cache_filename($this->feed_url), $this->data, $this->cache_duration)) { trigger_error("$this->cache_location is not writable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING); } return true; @@ -1716,7 +1714,7 @@ class SimplePie $cache = new BaseDataCache($cache); } - if ($cache !== false && ! $cache instanceof DataCache) { + if ($cache !== false && !$cache instanceof DataCache) { throw new InvalidArgumentException(sprintf( '%s(): Argument #1 ($cache) must be of type %s|false', __METHOD__, @@ -1774,7 +1772,7 @@ class SimplePie $headers['if-none-match'] = $this->data['headers']['etag']; } - $file = $this->registry->create(File::class, [$this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]); + $file = $this->registry->create(File::class, [$this->feed_url, $this->timeout / 10, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]); $this->status_code = $file->status_code; if ($file->success) { @@ -1811,7 +1809,7 @@ class SimplePie // If we don't already have the file (it'll only exist if we've opened it to check if the cache has been modified), open it. if (!isset($file)) { if ($this->file instanceof \SimplePie\File && $this->file->url === $this->feed_url) { - $file =& $this->file; + $file = &$this->file; } else { $headers = [ 'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1', @@ -1833,7 +1831,7 @@ class SimplePie if (!$locate->is_feed($file)) { $copyStatusCode = $file->status_code; - $copyContentType = $file->headers['content-type']; + $copyContentType = $file->headers['content-type'] ?? ''; try { $microformats = false; if (class_exists('DOMXpath') && function_exists('Mf2\parse')) { @@ -2641,12 +2639,12 @@ class SimplePie if ($this->registry->call(Misc::class, 'is_isegment_nz_nc', [$key])) { if (isset($this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key])) { $this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key]); - $this->data['links'][$key] =& $this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key]; + $this->data['links'][$key] = &$this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key]; } else { - $this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; + $this->data['links'][self::IANA_LINK_RELATIONS_REGISTRY . $key] = &$this->data['links'][$key]; } } elseif (substr($key, 0, 41) === self::IANA_LINK_RELATIONS_REGISTRY) { - $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; + $this->data['links'][substr($key, 41)] = &$this->data['links'][$key]; } $this->data['links'][$key] = array_unique($this->data['links'][$key]); } @@ -3103,7 +3101,7 @@ class SimplePie $trace = debug_backtrace(); $file = $trace[0]['file']; $line = $trace[0]['line']; - trigger_error("Call to undefined method $class::$method() in $file on line $line", E_USER_ERROR); + throw new SimplePieException("Call to undefined method $class::$method() in $file on line $line"); } /** diff --git a/vendor/simplepie/simplepie/src/Source.php b/vendor/simplepie/simplepie/src/Source.php index c7ed11600..5a8f86de9 100644 --- a/vendor/simplepie/simplepie/src/Source.php +++ b/vendor/simplepie/simplepie/src/Source.php @@ -1,6 +1,5 @@ registry->call(Misc::class, 'is_isegment_nz_nc', [$key])) { if (isset($this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key])) { $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key]); - $this->data['links'][$key] =& $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key]; + $this->data['links'][$key] = &$this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key]; } else { - $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; + $this->data['links'][\SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY . $key] = &$this->data['links'][$key]; } } elseif (substr($key, 0, 41) === \SimplePie\SimplePie::IANA_LINK_RELATIONS_REGISTRY) { - $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; + $this->data['links'][substr($key, 41)] = &$this->data['links'][$key]; } $this->data['links'][$key] = array_unique($this->data['links'][$key]); } diff --git a/vendor/simplepie/simplepie/src/XML/Declaration/Parser.php b/vendor/simplepie/simplepie/src/XML/Declaration/Parser.php index 5062e683f..59a0d83ee 100644 --- a/vendor/simplepie/simplepie/src/XML/Declaration/Parser.php +++ b/vendor/simplepie/simplepie/src/XML/Declaration/Parser.php @@ -1,6 +1,5 @@