From: Troy Engel Date: Sat, 5 Dec 2015 21:03:01 +0000 (-0600) Subject: Fix array checking method in 2 places, add array check in one location X-Git-Tag: 16.3~72^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5d5f100f4f781f744ccf769ed3790680e76a0ff1;p=tt-rss.git Fix array checking method in 2 places, add array check in one location --- diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 675e5c5d..1d7c638a 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -33,7 +33,7 @@ class Af_Readability extends Plugin { print_notice("Enable the plugin for specific feeds in the feed editor."); $enabled_feeds = $this->host->get($this, "enabled_feeds"); - if (!array($enabled_feeds)) $enabled_feeds = array(); + if (!is_array($enabled_feeds)) $enabled_feeds = array(); $enabled_feeds = $this->filter_unknown_feeds($enabled_feeds); $this->host->set($this, "enabled_feeds", $enabled_feeds); @@ -60,7 +60,7 @@ class Af_Readability extends Plugin { print "
"; $enabled_feeds = $this->host->get($this, "enabled_feeds"); - if (!array($enabled_feeds)) $enabled_feeds = array(); + if (!is_array($enabled_feeds)) $enabled_feeds = array(); $key = array_search($feed_id, $enabled_feeds); $checked = $key !== FALSE ? "checked" : ""; @@ -169,6 +169,8 @@ class Af_Readability extends Plugin { function hook_article_filter($article) { $enabled_feeds = $this->host->get($this, "enabled_feeds"); + if (!is_array($enabled_feeds)) return $article; + $key = array_search($article["feed"]["id"], $enabled_feeds); if ($key === FALSE) return $article;