]> git.wh0rd.org Git - tt-rss.git/commitdiff
Check return value from Plugins
authordim0x69 <anmeldung-gitttrssorg@dsmail.org>
Mon, 11 Dec 2017 09:41:45 +0000 (09:41 +0000)
committerdim0x69 <anmeldung-gitttrssorg@dsmail.org>
Mon, 11 Dec 2017 09:41:45 +0000 (09:41 +0000)
classes/pref/feeds.php [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index fcbc0f8..2a9c57e
@@ -1739,9 +1739,13 @@ class Pref_Feeds extends Handler_Protected {
        }
 
        static function remove_feed($id, $owner_uid) {
+               $debug = isset($_REQUEST["debug"]);
 
                foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_UNSUBSCRIBE_FEED) as $p) {
-                       $line = $p->hook_unsubscribe_feed($id, $owner_uid);
+                       if( ! $p->hook_unsubscribe_feed($id, $owner_uid)){
+                                       if($debug) _debug("Feed not removed due to Error in Plugin. (HOOK_UNSUBSCRIBE_FEED)");
+                                       return;
+                       }
                }
 
                if ($id > 0) {