diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-19 18:27:00 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-19 18:27:00 +0100 |
commit | d2d16c4c26f8f9a7ee97350e5cba5c3554c51013 (patch) | |
tree | 8e923d642e5fcabc0fada109b16b6461ea16ecdc | |
parent | 8f029258e94d811ab58e6bbb3180bf33595d69a5 (diff) |
fix unittest warning
-rw-r--r-- | articleenhancer/xpatharticleenhancer.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/articleenhancer/xpatharticleenhancer.php b/articleenhancer/xpatharticleenhancer.php index aa94eec54..42b2edf0c 100644 --- a/articleenhancer/xpatharticleenhancer.php +++ b/articleenhancer/xpatharticleenhancer.php @@ -67,6 +67,9 @@ class XPathArticleEnhancer implements ArticleEnhancer { } $enc = $enc ? $enc : 'UTF-8'; $body = mb_convert_encoding($body, 'HTML-ENTITIES', $enc); + if (trim($body) === '') { + return $item; + } $dom = new DOMDocument(); |