|
|
@@ -1849,7 +1849,8 @@ class SimplePie
|
|
|
$single_success = $this->multifeed_objects[$i]->init();
|
|
|
$success |= $single_success;
|
|
|
if (!$single_success) {
|
|
|
- $this->error[$i] = $this->multifeed_objects[$i]->error();
|
|
|
+ $error = $this->multifeed_objects[$i]->error() ?? '';
|
|
|
+ $this->error[$i] = is_string($error) ? $error : implode('; ', $error);
|
|
|
}
|
|
|
$i++;
|
|
|
}
|
|
|
@@ -1954,7 +1955,7 @@ class SimplePie
|
|
|
// Cache the file if caching is enabled
|
|
|
$this->data['cache_expiration_time'] = \SimplePie\HTTP\Utils::negociate_cache_expiration_time($this->data['headers'] ?? [], $this->cache_duration, $this->cache_duration_min, $this->cache_duration_max);
|
|
|
|
|
|
- if ($cache && !$cache->set_data($this->get_cache_filename($this->feed_url), $this->data, $this->cache_duration)) {
|
|
|
+ if ($cache instanceof DataCache && !$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;
|
|
|
@@ -3066,7 +3067,7 @@ class SimplePie
|
|
|
}
|
|
|
// https://datatracker.ietf.org/doc/html/rfc8288
|
|
|
if (is_string($link_headers) &&
|
|
|
- preg_match_all('/<(?P<uri>[^>]+)>\s*;\s*rel\s*=\s*(?P<quote>"?)' . preg_quote($rel) . '(?P=quote)\s*(?=,|$)/i', $link_headers, $matches)) {
|
|
|
+ preg_match_all('/<(?P<uri>[^>]+)>\s*;\s*rel\s*=\s*(?P<quote>"?)' . preg_quote($rel, '/') . '(?P=quote)\s*(?=,|$)/i', $link_headers, $matches)) {
|
|
|
return $matches['uri'];
|
|
|
}
|
|
|
}
|