aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/api.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/api.php b/engine/lib/api.php
index 4080a2ab1..46b3e0e40 100644
--- a/engine/lib/api.php
+++ b/engine/lib/api.php
@@ -1398,7 +1398,7 @@ function service_handler($handler, $request) {
// after the handler, the first identifier is response format
// ex) http://example.org/services/api/rest/xml/?method=test
- $reponse_format = $request[0];
+ $reponse_format = array_shift($request);
// Which view - xml, json, ...
if ($reponse_format) {
elgg_set_viewtype($reponse_format);
@@ -1413,7 +1413,7 @@ function service_handler($handler, $request) {
exit;
} else if (isset($CONFIG->servicehandler[$handler]) && is_callable($CONFIG->servicehandler[$handler])) {
$function = $CONFIG->servicehandler[$handler];
- $function($page, $handler);
+ $function($request, $handler);
} else {
// no handler for this web service
header("HTTP/1.0 404 Not Found");