summaryrefslogtreecommitdiffstats
path: root/lib/api.php
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2013-01-31 16:30:37 +0000
committerSam Tuke <samtuke@owncloud.com>2013-01-31 16:30:37 +0000
commit31e723a907399d7d33a0699da082164055f79b3e (patch)
tree7da079cc3db0a46512da1b02cc19307337d9ce54 /lib/api.php
parentc7b1bdf00e65cca2a42d77fc5f27d0ea69e53be3 (diff)
parent209d599ec5b00c5b92a33e902867fc621e725c93 (diff)
downloadnextcloud-server-31e723a907399d7d33a0699da082164055f79b3e.tar.gz
nextcloud-server-31e723a907399d7d33a0699da082164055f79b3e.zip
Merge github.com:owncloud/core
Conflicts: lib/public/share.php
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php3
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');
}