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:
Andrew O'Neil 2008-12-14 21:23:40 +00:00 committed by Sam Minnee
parent aa09425948
commit 915decb1f6

View File

@ -702,7 +702,7 @@ class DataObject extends ViewableData implements DataObjectInterface,i18nEntityP
// Update the changed array with references to changed obj-fields
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;
}
}