X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2Flib%2Ffeeddiscovery.php;h=e9c710bebdbbfa5010c4582cec6ff7a66c5b585e;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=a55399d7c8e9ef29cfa45bd83e4a15b6866859d9;hpb=9a53be4669e53ba343f4c6433405ae8de747a86f;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/lib/feeddiscovery.php b/plugins/OStatus/lib/feeddiscovery.php index a55399d7c8..e9c710bebd 100644 --- a/plugins/OStatus/lib/feeddiscovery.php +++ b/plugins/OStatus/lib/feeddiscovery.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class FeedSubBadURLException extends FeedSubException { @@ -48,6 +50,10 @@ class FeedSubNoFeedException extends FeedSubException { } +class FeedSubNoSalmonException extends FeedSubException +{ +} + class FeedSubBadXmlException extends FeedSubException { } @@ -196,8 +202,9 @@ class FeedDiscovery */ function discoverFromHTML($url, $body) { - // DOMDocument::loadHTML may throw warnings on unrecognized elements. - $old = error_reporting(error_reporting() & ~E_WARNING); + // DOMDocument::loadHTML may throw warnings on unrecognized elements, + // and notices on unrecognized namespaces. + $old = error_reporting(error_reporting() & ~(E_WARNING | E_NOTICE)); $dom = new DOMDocument(); $ok = $dom->loadHTML($body); error_reporting($old);