mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Changing from unset record entry to an empty value shouldn't register as a 'level 2' change
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@78155 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8c1cc8fcc7
commit
118cfc6ac0
@ -1884,7 +1884,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
// At the very least, the type has changed
|
||||
$this->changed[$fieldName] = 1;
|
||||
|
||||
if(!isset($this->record[$fieldName]) || $this->record[$fieldName] != $val) {
|
||||
if((!isset($this->record[$fieldName]) && $val) || (isset($this->record[$fieldName]) && $this->record[$fieldName] != $val)) {
|
||||
// Value has changed as well, not just the type
|
||||
$this->changed[$fieldName] = 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user