diff --git a/src/HasOneAddExistingAutoCompleter.php b/src/HasOneAddExistingAutoCompleter.php index eb36027..a8dc973 100644 --- a/src/HasOneAddExistingAutoCompleter.php +++ b/src/HasOneAddExistingAutoCompleter.php @@ -130,7 +130,7 @@ public function doSearch($gridField, $request) Config::nest(); - SSViewer::config()->update('source_file_comments', false); + SSViewer::config()->set('source_file_comments', false); $viewer = SSViewer::fromString($this->resultsFormat); @@ -147,7 +147,7 @@ public function doSearch($gridField, $request) Config::unnest(); return HTTPResponse::create() - ->setBody(Convert::array2json($json)) + ->setBody(json_encode($json)) ->addHeader('Content-Type', 'text/json'); } }