summaryrefslogtreecommitdiffstats
path: root/articleenhancer
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-06-26 11:55:23 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-06-26 11:55:23 +0200
commit501e29f71c5d863879eb67ed311549ee46e5a04b (patch)
tree011926600e8ed1bf7100a1218c942d030a966cf7 /articleenhancer
parent0f56b6d62cd4af2af5276f7c073737b2d07b0ffd (diff)
style fixes
Diffstat (limited to 'articleenhancer')
-rw-r--r--articleenhancer/xpatharticleenhancer.php9
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();