mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Check hasChanged method exists before calling it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68809 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
aa09425948
commit
915decb1f6
@ -702,7 +702,7 @@ class DataObject extends ViewableData implements DataObjectInterface,i18nEntityP
|
|||||||
|
|
||||||
// Update the changed array with references to changed obj-fields
|
// Update the changed array with references to changed obj-fields
|
||||||
foreach($this->record as $k => $v) {
|
foreach($this->record as $k => $v) {
|
||||||
if(is_object($v) && $v->isChanged()) {
|
if(is_object($v) && method_exists($v, 'isChanged') && $v->isChanged()) {
|
||||||
$this->changed[$k] = true;
|
$this->changed[$k] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2970,4 +2970,4 @@ class DataObject extends ViewableData implements DataObjectInterface,i18nEntityP
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user