mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-04 22:53:27 -04:00
Manual update SimplePie (#4011)
*417a1661b2*ebdd0643ee*941412027a*f58a23730f
This commit is contained in:
committed by
GitHub
parent
48ca0bb764
commit
b21fe199ed
@@ -2707,13 +2707,19 @@ class SimplePie
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->data['headers']['link']) &&
|
||||
preg_match('/<([^>]+)>; rel='.preg_quote($rel).'/',
|
||||
$this->data['headers']['link'], $match))
|
||||
if (isset($this->data['headers']['link']))
|
||||
{
|
||||
return array($match[1]);
|
||||
$link_headers = $this->data['headers']['link'];
|
||||
if (is_string($link_headers)) {
|
||||
$link_headers = array($link_headers);
|
||||
}
|
||||
$matches = preg_filter('/<([^>]+)>; rel='.preg_quote($rel).'/', '$1', $link_headers);
|
||||
if (!empty($matches)) {
|
||||
return $matches;
|
||||
}
|
||||
}
|
||||
else if (isset($this->data['links'][$rel]))
|
||||
|
||||
if (isset($this->data['links'][$rel]))
|
||||
{
|
||||
return $this->data['links'][$rel];
|
||||
}
|
||||
|
||||
@@ -1152,7 +1152,12 @@ class SimplePie_Enclosure
|
||||
// If we encounter an unsupported mime-type, check the file extension and guess intelligently.
|
||||
if (!in_array($type, array_merge($types_flash, $types_fmedia, $types_quicktime, $types_wmedia, $types_mp3)))
|
||||
{
|
||||
switch (strtolower($this->get_extension()))
|
||||
$extension = $this->get_extension();
|
||||
if ($extension === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (strtolower($extension))
|
||||
{
|
||||
// Audio mime-types
|
||||
case 'aac':
|
||||
|
||||
@@ -507,11 +507,13 @@ class SimplePie_HTTP_Parser
|
||||
{
|
||||
$data = explode("\r\n\r\n", $headers, $count);
|
||||
$data = array_pop($data);
|
||||
if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n\r\n")) {
|
||||
$data = str_ireplace("HTTP/1.0 200 Connection established\r\n\r\n", '', $data);
|
||||
if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n")) {
|
||||
$exploded = explode("\r\n\r\n", $data, 2);
|
||||
$data = end($exploded);
|
||||
}
|
||||
if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n\r\n")) {
|
||||
$data = str_ireplace("HTTP/1.1 200 Connection established\r\n\r\n", '', $data);
|
||||
if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n")) {
|
||||
$exploded = explode("\r\n\r\n", $data, 2);
|
||||
$data = end($exploded);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -208,7 +208,8 @@ class SimplePie_Registry
|
||||
{
|
||||
case 'Cache':
|
||||
// For backwards compatibility with old non-static
|
||||
// Cache::create() methods
|
||||
// Cache::create() methods in PHP < 8.0.
|
||||
// No longer supported as of PHP 8.0.
|
||||
if ($method === 'get_handler')
|
||||
{
|
||||
$result = @call_user_func_array(array($class, 'create'), $parameters);
|
||||
|
||||
Reference in New Issue
Block a user