Skip to content

Commit a3612a1

Browse files
committed
Rollback reverse empty allowance.
A bit too intricate. If need should arise, we will add.
1 parent e696ad1 commit a3612a1

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

config/audit.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,13 @@
9898
| those from the empty values check. For example when auditing
9999
| model retrieved events which will never have new and old values.
100100
|
101-
| When using empty_values => true, you can still exclude certain events
102-
| with empty values by specifying them in disallowed_empty_values.
103101
|
104102
*/
105103

106104
'empty_values' => true,
107105
'allowed_empty_values' => [
108106
'retrieved'
109107
],
110-
'disallowed_empty_values' => [
111-
],
112108

113109
/*
114110
|--------------------------------------------------------------------------

src/Auditor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ public function execute(Auditable $model)
7070
// Check if we want to avoid storing empty values
7171
$allowEmpty = Config::get('audit.empty_values');
7272
$explicitAllowEmpty = in_array($model->getAuditEvent(), Config::get('audit.allowed_empty_values', []));
73-
$explicitDisallowEmpty = in_array($model->getAuditEvent(), Config::get('audit.disallowed_empty_values', []));
7473

75-
if ($explicitDisallowEmpty || (!$allowEmpty && !$explicitAllowEmpty)) {
74+
if (!$allowEmpty && !$explicitAllowEmpty) {
7675
if (
7776
empty($model->toAudit()['new_values']) &&
7877
empty($model->toAudit()['old_values'])

0 commit comments

Comments
 (0)