diff --git a/Model/Behavior/AuditableBehavior.php b/Model/Behavior/AuditableBehavior.php index e6610d9..052d2ca 100644 --- a/Model/Behavior/AuditableBehavior.php +++ b/Model/Behavior/AuditableBehavior.php @@ -217,9 +217,9 @@ public function afterSave(Model $Model, $created, $options = array()) { ), ); } else { - if (Hash::check($this->_getOriginalDataForModel($Model), $property) + if ((Hash::check($this->_getOriginalDataForModel($Model), $property) && Hash::get($this->_getOriginalDataForModel($Model), $property) != $value - ) { + ) || (Hash::get($this->_getOriginalDataForModel($Model), $property) == NULl && $value != NULL and $value!="")) { // If the property exists in the original _and_ the // value is different, store it. $delta = array(