mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 13:45:56 +00:00
pluginhandler: better error reporting
This commit is contained in:
@@ -9,8 +9,14 @@ class PluginHandler extends Handler_Protected {
|
|||||||
|
|
||||||
$plugin = $pluginhost->get_plugin($_REQUEST["plugin"]);
|
$plugin = $pluginhost->get_plugin($_REQUEST["plugin"]);
|
||||||
|
|
||||||
if (method_exists($plugin, $method)) {
|
if ($plugin) {
|
||||||
$plugin->$method();
|
if (method_exists($plugin, $method)) {
|
||||||
|
$plugin->$method();
|
||||||
|
} else {
|
||||||
|
print json_encode(array("error" => "METHOD_NOT_FOUND"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print json_encode(array("error" => "PLUGIN_NOT_FOUND"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user