summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--init.php5
2 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index d794093..ed7365b 100644
--- a/README.md
+++ b/README.md
@@ -84,7 +84,7 @@ To test your XPath expressions, you can use these Chrome extensions:
Some XPath expressions you could need (the `//` is automatically prepended and must be omitted in the FeedMod configuration):
-##### HTML5 <article> tag
+##### HTML5 &lt;article&gt; tag
```html
<article>…article…</article>
diff --git a/init.php b/init.php
index ddfde29..8922a40 100644
--- a/init.php
+++ b/init.php
@@ -52,6 +52,11 @@ class Af_Feedmod extends Plugin implements IHandler
$owner_uid = $article['owner_uid'];
$data = json_decode($json_conf, true);
+ if (!is_array($data)) {
+ // no valid JSON or no configuration at all
+ return $article;
+ }
+
foreach ($data as $urlpart=>$config) {
if (strpos($article['link'], $urlpart) === false) continue; // skip this config if URL not matching
if (strpos($article['plugin_data'], "feedmod,$owner_uid:") !== false) {