diff options
Diffstat (limited to 'articleenhancer')
-rw-r--r-- | articleenhancer/xpatharticleenhancer.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/articleenhancer/xpatharticleenhancer.php b/articleenhancer/xpatharticleenhancer.php index 0f541c2ce..4037d88ac 100644 --- a/articleenhancer/xpatharticleenhancer.php +++ b/articleenhancer/xpatharticleenhancer.php @@ -56,11 +56,14 @@ class XPathArticleEnhancer implements ArticleEnhancer { $file = $this->getFile($item->getUrl()); // convert encoding by detecting charset from header - $contentType = $file->headers['content-type']; + /** @noinspection PhpUndefinedFieldInspection */ + $contentType = $file->headers['content-type']; if( preg_match( '/(?<=charset=)[^;]*/', $contentType, $matches ) ) { - $body = mb_convert_encoding($file->body, 'HTML-ENTITIES', $matches[0]); + /** @noinspection PhpUndefinedFieldInspection */ + $body = mb_convert_encoding($file->body, 'HTML-ENTITIES', $matches[0]); } else { - $body = $file->body; + /** @noinspection PhpUndefinedFieldInspection */ + $body = $file->body; } $dom = new \DOMDocument(); |