SummitEntityEvent Error
Fixed null pointer exception on getOwnerID method Change-Id: I249bc0d459275872c745ec0c9cdd6caab83e929c
This commit is contained in:
parent
852a8bf33e
commit
25d2d2d467
@ -113,7 +113,7 @@ class SummitEntityEvent extends SilverstripeBaseModel
|
||||
*/
|
||||
public function getOwnerId(){
|
||||
try{
|
||||
return $this->owner->getId();
|
||||
return is_null($this->owner) ? 0 : $this->owner->getId();
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user