chg: [object:fromAttributes] Returns correct value if attribute list is

empty
pull/4672/head
mokaddem 2019-05-21 08:35:19 +02:00
parent 753a445177
commit 7a104a2d0f
1 changed files with 1 additions and 1 deletions

View File

@ -739,7 +739,7 @@ class MispObject extends AppModel
);
// $attribute_types = array_keys(Hash::combine($attributes, '{n}.Attribute.type'));
if (empty($attributes)) {
return array();
return array('templates' => array(), 'types' => array());
}
$attribute_types = array();
foreach ($attributes as $i => $attribute) {