mirror of https://github.com/MISP/MISP
fix: [correlation:getRelatedAttribute] Always return an array
parent
e4efe1b305
commit
5bed18614b
|
@ -830,12 +830,12 @@ class Correlation extends AppModel
|
|||
* @param array $attribute Attribute Array
|
||||
* @param array $fields List of fields to include
|
||||
* @param bool $includeEventData Flag to include the event data in the response
|
||||
* @return array|null
|
||||
* @return array
|
||||
*/
|
||||
public function getRelatedAttributes($user, $sgids, $attribute, $fields=[], $includeEventData = false)
|
||||
public function getRelatedAttributes($user, $sgids, $attribute, $fields=[], $includeEventData = false): array
|
||||
{
|
||||
if (in_array($attribute['type'], Attribute::NON_CORRELATING_TYPES)) {
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
return $this->runGetRelatedAttributes($user, $sgids, $attribute, $fields, $includeEventData);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue