diff --git a/src/Module/Api/ApiResponse.php b/src/Module/Api/ApiResponse.php index ed3b446d0c..82801f2e60 100644 --- a/src/Module/Api/ApiResponse.php +++ b/src/Module/Api/ApiResponse.php @@ -96,14 +96,11 @@ class ApiResponse case 'atom': case 'rss': case 'xml': - $ret = $this->createXML($data, $root_element); - break; + return $this->createXML($data, $root_element); case 'json': default: - $ret = $data; - break; + return $data; } - return $ret; } /**