fix: [internal] fix to various CLI commands breaking on the IP field in the log table not having a default value, fixes #6263

pull/6298/head
iglocska 2020-09-08 13:10:10 +02:00
parent 1684478091
commit 14ca7ddf49
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 1 additions and 1 deletions

View File

@ -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;