diff options
Diffstat (limited to 'lib/api.php')
-rw-r--r-- | lib/api.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api.php b/lib/api.php index 0fce109a423..545b55757ff 100644 --- a/lib/api.php +++ b/lib/api.php @@ -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'); } |