diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | init.php | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -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 <article> tag ```html <article>…article…</article> @@ -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) { |
