]> git.wh0rd.org Git - tt-rss.git/commitdiff
catch warning when removing source element
authorAndrew Dolgov <fox@fakecake.org>
Wed, 10 Jul 2013 08:50:42 +0000 (12:50 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Wed, 10 Jul 2013 08:50:42 +0000 (12:50 +0400)
classes/feeditem/common.php

index f8fd3c62a79de5bd6ffde77598eefe6f04a0e52f..58065b19879e92ecc3c726bf6e3f2379bda1e161 100644 (file)
@@ -9,11 +9,16 @@ abstract class FeedItem_Common extends FeedItem {
                $this->xpath = $xpath;
                $this->doc = $doc;
 
-               $source = $elem->getElementsByTagName("source")->item(0);
+               try {
 
-               // we don't need <source> element
-               if ($source)
-                       $elem->removeChild($source);
+                       $source = $elem->getElementsByTagName("source")->item(0);
+
+                       // we don't need <source> element
+                       if ($source)
+                               $elem->removeChild($source);
+               } catch (DOMException $e) {
+                       //
+               }
        }
 
        function get_author() {