]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/feeddiscovery.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / OStatus / lib / feeddiscovery.php
index a55399d7c8e9ef29cfa45bd83e4a15b6866859d9..e9c710bebdbbfa5010c4582cec6ff7a66c5b585e 100644 (file)
@@ -22,7 +22,9 @@
  * @maintainer Brion Vibber <brion@status.net>
  */
 
-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);