]> git.wh0rd.org Git - tt-rss.git/commitdiff
Revert "Fix accidental use of emtpy array: [E_WARNING (2) plugins/af_readability...
authorTroy Engel <troyengel@gmail.com>
Sat, 5 Dec 2015 20:49:54 +0000 (14:49 -0600)
committerTroy Engel <troyengel@gmail.com>
Sat, 5 Dec 2015 20:49:54 +0000 (14:49 -0600)
This reverts commit beaddcba961cd187e6d3ce968b94610838d70b54.

plugins/af_readability/init.php

index 97acb4375391a251dd98f549a3f0a5c2fe3cc5df..675e5c5d5214ea309bb289f8b59ff8f60f6385df 100755 (executable)
@@ -33,11 +33,9 @@ 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();
-               } else {
-                       $enabled_feeds = $this->filter_unknown_feeds($enabled_feeds);
-               }
+               if (!array($enabled_feeds)) $enabled_feeds = array();
+
+               $enabled_feeds = $this->filter_unknown_feeds($enabled_feeds);
                $this->host->set($this, "enabled_feeds", $enabled_feeds);
 
                if (count($enabled_feeds) > 0) {
@@ -185,14 +183,12 @@ class Af_Readability extends Plugin {
        private function filter_unknown_feeds($enabled_feeds) {
                $tmp = array();
 
-               if (!empty($enabled_feeds)) {
-                       foreach ($enabled_feeds as $feed) {
+               foreach ($enabled_feeds as $feed) {
 
-                               $result = db_query("SELECT id FROM ttrss_feeds WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
+                       $result = db_query("SELECT id FROM ttrss_feeds WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
 
-                               if (db_num_rows($result) != 0) {
-                                       array_push($tmp, $feed);
-                               }
+                       if (db_num_rows($result) != 0) {
+                               array_push($tmp, $feed);
                        }
                }