mirror of https://github.com/MISP/MISP
chg: [logbehaviour] skipfields reverted to an array from a constant
- keeps ancient PHP versions happy (as happy as anyone can be knowing they run ancient PHP versions)pull/7694/head
parent
96b4f86c62
commit
9d7da3103f
|
@ -16,7 +16,7 @@ class AuditLogBehavior extends ModelBehavior
|
|||
private $enabled;
|
||||
|
||||
// Hash is faster that in_array
|
||||
const SKIP_FIELDS = [
|
||||
private $skipFields = [
|
||||
'id' => true,
|
||||
'lastpushedid' => true,
|
||||
'timestamp' => true,
|
||||
|
@ -292,7 +292,7 @@ class AuditLogBehavior extends ModelBehavior
|
|||
$dbFields = $model->schema();
|
||||
$changedFields = [];
|
||||
foreach ($model->data[$model->alias] as $key => $value) {
|
||||
if (isset(self::SKIP_FIELDS[$key])) {
|
||||
if (isset($this->skipFields[$key])) {
|
||||
continue;
|
||||
}
|
||||
if (!isset($dbFields[$key])) {
|
||||
|
|
Loading…
Reference in New Issue