mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 05:09:06 +02:00
Merge pull request #2621 from tractorcow/pulls/3.1-undefined-index
BUG Fix undefined index ID
This commit is contained in:
commit
ba1e688729
@ -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…
Reference in New Issue
Block a user