X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FApi%2FApiResponse.php;h=b5b2a4717c45bf9a25c9a34c15a1463aff8d5769;hb=706444bdb22b57f18c284044bdbdaeb7610990fe;hp=a113dab84f3b110f400b5cf4d8e2d5def81fa4c6;hpb=6aa1dcfad371f34fea1f8e39b73de2cc3dd05784;p=friendica.git diff --git a/src/Module/Api/ApiResponse.php b/src/Module/Api/ApiResponse.php index a113dab84f..b5b2a4717c 100644 --- a/src/Module/Api/ApiResponse.php +++ b/src/Module/Api/ApiResponse.php @@ -99,7 +99,7 @@ class ApiResponse extends Response $data3 = [$root_element => $data2]; - return XML::fromArray($data3, $xml, false, $namespaces); + return XML::fromArray($data3, $dummy, false, $namespaces); } /** @@ -276,9 +276,8 @@ class ApiResponse extends Response 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '', 'request' => $request, ]); - $error = $this->l10n->t('API endpoint %s %s is not implemented', strtoupper($method), $path); - $error_description = $this->l10n->t('The API endpoint is currently not implemented but might be in the future.'); + $error = $this->l10n->t('API endpoint %s %s is not implemented but might be in the future.', strtoupper($method), $path); - $this->exit('error', ['error' => ['error' => $error, 'error_description' => $error_description]]); + $this->error(501, 'Not Implemented', $error); } }