fix: Allow cluster authors to be an actual array

pull/6932/head
Tom King 2021-01-30 15:15:00 +00:00
parent 55a8850bf6
commit 8892fed986
1 changed files with 3 additions and 1 deletions

View File

@ -391,7 +391,9 @@ class GalaxyClustersController extends AppController
if (empty($cluster['GalaxyCluster']['authors'])) {
$cluster['GalaxyCluster']['authors'] = [];
} else {
} else if (is_array($cluster['GalaxyCluster']['authors'])) {
// This is as intended, move on
}else {
$decoded = json_decode($cluster['GalaxyCluster']['authors'], true);
if (is_null($decoded)) { // authors might be comma separated
$decoded = array_map('trim', explode(',', $cluster['GalaxyCluster']['authors']));