mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Fix undefined index ID
This commit is contained in:
parent
a0b7bfc7a5
commit
22f5f4d644
@ -639,7 +639,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* @return boolean true if this object exists
|
||||
*/
|
||||
public function exists() {
|
||||
return ($this->record && $this->record['ID'] > 0);
|
||||
return (isset($this->record['ID']) && $this->record['ID'] > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user