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
iglocska 2021-08-09 10:52:25 +02:00
parent 96b4f86c62
commit 9d7da3103f
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 2 deletions

View File

@ -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])) {