diff --git a/app/Model/MispObject.php b/app/Model/MispObject.php index fc496b173..e387962de 100644 --- a/app/Model/MispObject.php +++ b/app/Model/MispObject.php @@ -737,7 +737,6 @@ class MispObject extends AppModel ), ) ); - // $attribute_types = array_keys(Hash::combine($attributes, '{n}.Attribute.type')); if (empty($attributes)) { return array('templates' => array(), 'types' => array()); } @@ -822,7 +821,6 @@ class MispObject extends AppModel public function groupAttributesIntoObject($user, $event_id, $object, $template, $selected_attribute_ids, $selected_object_relation_mapping, $hard_delete_attribute) { $saved_object_id = $this->saveObject($object, $event_id, $template, $user); - if (!is_numeric($saved_object_id)) { return $saved_object_id; } @@ -843,7 +841,7 @@ class MispObject extends AppModel } $event = array('Event' => $existing_attributes[0]['Event']); - // Duplicate the attribute and its context, otherwise connected instance will drop the duplicated UUID + // Duplicate the attribute and its context, otherwise connected instances will drop the duplicated UUID foreach ($existing_attributes as $i => $existing_attribute) { if (isset($selected_object_relation_mapping[$existing_attribute['Attribute']['id']])) { $sightings = $this->Event->Sighting->attachToEvent($event, $user, $existing_attribute['Attribute']['id']); diff --git a/app/Model/ObjectTemplate.php b/app/Model/ObjectTemplate.php index caac6fcb0..2608c01b1 100644 --- a/app/Model/ObjectTemplate.php +++ b/app/Model/ObjectTemplate.php @@ -243,7 +243,7 @@ class ObjectTemplate extends AppModel } } - // at this point, an object can be created; checking if all attribute are valids + // at this point, an object could created; checking if all attribute are valids $valid_types = array(); $to_return['invalidTypes'] = array(); $to_return['invalidTypesMultiple'] = array();