mirror of https://github.com/MISP/MISP
fix: [internal] fix to various CLI commands breaking on the IP field in the log table not having a default value, fixes #6263
parent
1684478091
commit
14ca7ddf49
|
@ -114,7 +114,7 @@ class Log extends AppModel
|
|||
$this->data['Log']['ip'] = $_SERVER[$ip_header];
|
||||
}
|
||||
}
|
||||
$setEmpty = array('title' => '', 'model' => '', 'model_id' => 0, 'action' => '', 'user_id' => 0, 'change' => '', 'email' => '', 'org' => '', 'description' => '');
|
||||
$setEmpty = array('title' => '', 'model' => '', 'model_id' => 0, 'action' => '', 'user_id' => 0, 'change' => '', 'email' => '', 'org' => '', 'description' => '', 'ip' => '');
|
||||
foreach ($setEmpty as $field => $empty) {
|
||||
if (!isset($this->data['Log'][$field]) || empty($this->data['Log'][$field])) {
|
||||
$this->data['Log'][$field] = $empty;
|
||||
|
|
Loading…
Reference in New Issue