Skip to content
Snippets Groups Projects
Commit 1dac2ba4 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #1286 from owncloud/ocs_api

Check that external api methods return instances of OC_OCS_Result
parents f9a9fc56 8f9d3cd0
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,9 @@ class OC_API {
if(self::isAuthorised(self::$actions[$name])) {
if(is_callable(self::$actions[$name]['action'])) {
$response = call_user_func(self::$actions[$name]['action'], $parameters);
if(!($response instanceof OC_OCS_Result)) {
$response = new OC_OCS_Result(null, 996, 'Internal Server Error');
}
} else {
$response = new OC_OCS_Result(null, 998, 'Api method not found');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment