fix: [correlation:getRelatedAttribute] Always return an array

pull/8530/head
Sami Mokaddem 2022-08-04 14:51:37 +02:00
parent e4efe1b305
commit 5bed18614b
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}