Skip to content

Commit

Permalink
Merge pull request #233 from dersell/fix_canHandle
Browse files Browse the repository at this point in the history
Fix for TypeError
  • Loading branch information
alexdebril authored Oct 10, 2019
2 parents 4305f5f + 991640e commit 2a60b3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/FeedIo/Standard/Atom.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function format(\DOMDocument $document) : \DOMDocument
*/
public function canHandle(Document $document) : bool
{
if(!isset($document->getDOMDocument()->documentElement->tagName)) return false;
return self::ROOT_NODE_TAGNAME === $document->getDOMDocument()->documentElement->tagName;
}

Expand Down
1 change: 1 addition & 0 deletions src/FeedIo/Standard/Rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function format(\DOMDocument $document) : \DOMDocument
*/
public function canHandle(Document $document) : bool
{
if(!isset($document->getDOMDocument()->documentElement->tagName)) return false;
return static::ROOT_NODE_TAGNAME === $document->getDOMDocument()->documentElement->tagName;
}

Expand Down

0 comments on commit 2a60b3a

Please sign in to comment.