mirror of https://github.com/MISP/MISP
don't bother trimming if it's going to exit anyways.
removes a warning on empty attribute.pull/1184/head
parent
044755fe07
commit
a308f8dcf5
|
@ -513,13 +513,13 @@ class Attribute extends AppModel {
|
|||
|
||||
public function beforeValidate($options = array()) {
|
||||
parent::beforeValidate();
|
||||
// remove leading and trailing blanks
|
||||
$this->data['Attribute']['value'] = trim($this->data['Attribute']['value']);
|
||||
|
||||
if (!isset($this->data['Attribute']['type'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// remove leading and trailing blanks
|
||||
$this->data['Attribute']['value'] = trim($this->data['Attribute']['value']);
|
||||
|
||||
// make some last changes to the inserted value
|
||||
$this->data['Attribute']['value'] = $this->modifyBeforeValidation($this->data['Attribute']['type'], $this->data['Attribute']['value']);
|
||||
|
||||
|
|
Loading…
Reference in New Issue