fix: [API] Empty 'restricted to domains' returns string instead of array, fixes #4928

pull/4939/head
iglocska 2019-07-29 11:06:45 +02:00
parent 8378ec2997
commit d98b20b73c
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 0 deletions

View File

@ -135,6 +135,8 @@ class Organisation extends AppModel
foreach ($results as $k => $organisation) {
if (!empty($organisation['Organisation']['restricted_to_domain'])) {
$results[$k]['Organisation']['restricted_to_domain'] = json_decode($organisation['Organisation']['restricted_to_domain'], true);
} else {
$results[$k]['Organisation']['restricted_to_domain'] = array();
}
}
return $results;