mirror of https://github.com/MISP/MISP
Further fixes that caused issues with old PHP versions
parent
a2f87faf1f
commit
9223240efd
|
@ -168,7 +168,8 @@ class AppModel extends Model {
|
|||
public function valueNotEmpty($value) {
|
||||
$field = array_keys($value);
|
||||
$field = $field[0];
|
||||
if (!empty(trim($value[$field]))) return true;
|
||||
$value[$field] = trim($value[$field]);
|
||||
if (!empty($value[$field])) return true;
|
||||
return ucfirst($field) . ' cannot be empty.';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue