Closed ravage84 closed 8 years ago
Yes, that's a good point.
The circumvent the problem with check boxes the check could also be changed to:
if ( ! (null === $value || $value === '') )
But there might be more cases I'm not think of right now
What's the problem of logging an empty value? A empty value is a value nonetheless...
After giving it some more thought.. yes, agreed
For example when you have form with a checkbox (true/false), it does not save the false value for this form for a NEW record, when the checkbox is not checked.
The causing line is this: https://github.com/robwilkerson/CakePHP-Audit-Log-Plugin/blob/2.0.1/Model/Behavior/AuditableBehavior.php#L169
It seems this was deliberate, but I think it's a somewhat unwanted behavior.
Arguably, this could be a configurable setting.