From 27d9fbd9dddf6c6a8c9dd78e8afcdff6afd697db Mon Sep 17 00:00:00 2001 From: Tom Stovall <119924+stovak@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:43:48 -0800 Subject: [PATCH] [Jeli 93] Fix fatal error on "Post Schema" page (#197) --------- Co-authored-by: Phil Tyler --- .../src/Form/PantheonSolrAdminForm.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/search_api_pantheon_admin/src/Form/PantheonSolrAdminForm.php b/modules/search_api_pantheon_admin/src/Form/PantheonSolrAdminForm.php index 6773cbdc..f77d91ff 100644 --- a/modules/search_api_pantheon_admin/src/Form/PantheonSolrAdminForm.php +++ b/modules/search_api_pantheon_admin/src/Form/PantheonSolrAdminForm.php @@ -79,6 +79,11 @@ public function buildForm( '#group' => 'status', '#weight' => substr($filename, 0, -3) === 'xml' ? -10 : 10, ]; + + if (is_array($file_contents)) { + $file_contents = json_encode($file_contents); + } + $form[$filename][] = $this->getViewSolrFile($filename, $file_contents, $is_open); $is_open = FALSE; }