SimplePie: Ensure the DOMNode::getLineNo() method exists. props rmccue. fixes #22425.

git-svn-id: https://develop.svn.wordpress.org/trunk@22555 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-13 00:49:15 +00:00
parent 630484f453
commit ec11387b66
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ class SimplePie_Locator
$parsed = $this->registry->call('Misc', 'parse_url', array($href)); $parsed = $this->registry->call('Misc', 'parse_url', array($href));
if ($parsed['scheme'] === '' || preg_match('/^(http(s)|feed)?$/i', $parsed['scheme'])) if ($parsed['scheme'] === '' || preg_match('/^(http(s)|feed)?$/i', $parsed['scheme']))
{ {
if ($this->base_location < $link->getLineNo()) if (method_exists($link, 'getLineNo') && $this->base_location < $link->getLineNo())
{ {
$href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->base)); $href = $this->registry->call('Misc', 'absolutize_url', array(trim($link->getAttribute('href')), $this->base));
} }