mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 08:51:30 +00:00
pluginhandler/public: report errors with E_USER_WARNING
This commit is contained in:
@@ -1216,17 +1216,17 @@ class Handler_Public extends Handler {
|
|||||||
if ($plugin->is_public_method($method)) {
|
if ($plugin->is_public_method($method)) {
|
||||||
$plugin->$method();
|
$plugin->$method();
|
||||||
} else {
|
} else {
|
||||||
user_error("PluginHandler[PUBLIC]: Requested private method '$method' of plugin '$plugin_name'.");
|
user_error("PluginHandler[PUBLIC]: Requested private method '$method' of plugin '$plugin_name'.", E_USER_WARNING);
|
||||||
header("Content-Type: text/json");
|
header("Content-Type: text/json");
|
||||||
print error_json(6);
|
print error_json(6);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
user_error("PluginHandler[PUBLIC]: Requested unknown method '$method' of plugin '$plugin_name'.");
|
user_error("PluginHandler[PUBLIC]: Requested unknown method '$method' of plugin '$plugin_name'.", E_USER_WARNING);
|
||||||
header("Content-Type: text/json");
|
header("Content-Type: text/json");
|
||||||
print error_json(13);
|
print error_json(13);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
user_error("PluginHandler[PUBLIC]: Requested method '$method' of unknown plugin '$plugin_name'.");
|
user_error("PluginHandler[PUBLIC]: Requested method '$method' of unknown plugin '$plugin_name'.", E_USER_WARNING);
|
||||||
header("Content-Type: text/json");
|
header("Content-Type: text/json");
|
||||||
print error_json(14);
|
print error_json(14);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user