summaryrefslogtreecommitdiff
path: root/classes/PluginHost.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/PluginHost.php')
-rw-r--r--classes/PluginHost.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/classes/PluginHost.php b/classes/PluginHost.php
index b54e48d4f..608355158 100644
--- a/classes/PluginHost.php
+++ b/classes/PluginHost.php
@@ -782,12 +782,21 @@ class PluginHost {
return $this->feeds[$cat_id] ?? [];
}
- // convert feed_id (e.g. -129) to pfeed_id first
+ /**
+ * convert feed_id (e.g. -129) to pfeed_id first
+ *
+ * @return (Plugin&IVirtualFeed)|null
+ */
function get_feed_handler(int $pfeed_id): ?Plugin {
foreach ($this->feeds as $cat) {
foreach ($cat as $feed) {
if ($feed['id'] == $pfeed_id) {
- return $feed['sender'];
+ if (implements_interface($feed['sender'], 'IVirtualFeed')) {
+ /** @var Plugin&IVirtualFeed $feed['sender'] */
+ return $feed['sender'];
+ } else {
+ return null;
+ }
}
}
}