mirror of https://github.com/MISP/MISP
fix: [API] Empty 'restricted to domains' returns string instead of array, fixes #4928
parent
8378ec2997
commit
d98b20b73c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue