Skip to content

Commit

Permalink
Encode solr file contents if is json
Browse files Browse the repository at this point in the history
  • Loading branch information
pwtyler committed Nov 15, 2024
1 parent 0e35b4a commit 268a23f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public function buildForm(
'#group' => 'status',
'#weight' => substr($filename, 0, -3) === 'xml' ? -10 : 10,
];

if ( ! is_string($file_contents)) {
$file_contents = json_encode($file_contents);
}
$form[$filename][] = $this->getViewSolrFile($filename, $file_contents, $is_open);
$is_open = FALSE;
}
Expand Down

0 comments on commit 268a23f

Please sign in to comment.