diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-02-19 12:23:35 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-02-19 12:23:44 +0100 |
commit | 04dc1076f13567549602802bbf8e931879174353 (patch) | |
tree | 490cab68e0d887e422246cd0351b309c3d9cdefa /vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php | |
parent | 4b6e528a5f0472624644bd812c19af55fea52080 (diff) |
fix #734 and set a CSP on master
Diffstat (limited to 'vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php')
-rw-r--r-- | vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php index 687ce99c0..73a4a43a6 100644 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php +++ b/vendor/fguillot/picofeed/lib/PicoFeed/Parser/XmlParser.php @@ -198,8 +198,10 @@ class XmlParser $p1 = strpos($data, 'encoding='); $p2 = strpos($data, '"', $p1 + 10); - $encoding = substr($data, $p1 + 10, $p2 - $p1 - 10); - $encoding = strtolower($encoding); + if ($p1 !== false && $p2 !== false) { + $encoding = substr($data, $p1 + 10, $p2 - $p1 - 10); + $encoding = strtolower($encoding); + } } return $encoding; |