diff options
| author | 2021-12-01 23:24:18 +0100 | |
|---|---|---|
| committer | 2021-12-01 23:24:18 +0100 | |
| commit | b21fe199ed19fcc08fe3ece2d9ab553dcc0e73c9 (patch) | |
| tree | 185571a69cab7c28bac0db5ff6917dab38ef327c /lib/SimplePie/SimplePie.php | |
| parent | 48ca0bb76489e16b26cb6af0a475996e42378b15 (diff) | |
Manual update SimplePie (#4011)
* https://github.com/simplepie/simplepie/commit/417a1661b2610448bd8e1835d6d4160a0aff9a97
* https://github.com/simplepie/simplepie/commit/ebdd0643ee927edfcaf40bfd27ab23ce9c975120
* https://github.com/simplepie/simplepie/commit/941412027a46979b4f1d29e53edf91829788d781
* https://github.com/simplepie/simplepie/commit/f58a23730f01f26bbcfe02ff9266e337c241be88
Diffstat (limited to 'lib/SimplePie/SimplePie.php')
| -rw-r--r-- | lib/SimplePie/SimplePie.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.php index 15b4dfea4..fbb0041f6 100644 --- a/lib/SimplePie/SimplePie.php +++ b/lib/SimplePie/SimplePie.php @@ -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]; } |
