diff --git a/module/VuFind/src/VuFind/Controller/HierarchyController.php b/module/VuFind/src/VuFind/Controller/HierarchyController.php index 176eb17787d6c6b9c490fbfa56634d5c277e3b66..41459221330e1e736ebc836839087bd172a39e0d 100644 --- a/module/VuFind/src/VuFind/Controller/HierarchyController.php +++ b/module/VuFind/src/VuFind/Controller/HierarchyController.php @@ -57,16 +57,18 @@ class HierarchyController extends AbstractBase /** * Output JSON * - * @param string $json A JSON string + * @param string $json A JSON string + * @param int $status Response status code * * @return \Zend\Http\Response */ - protected function outputJSON($json) + protected function outputJSON($json, $status = 200) { $response = $this->getResponse(); $headers = $response->getHeaders(); $headers->addHeaderLine('Content-type', 'application/json'); $response->setContent($json); + $response->setStatusCode($status); return $response; }