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:
parent
630484f453
commit
ec11387b66
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue