Skip to content
Snippets Groups Projects
Commit ca667fbf authored by Jared Hancock's avatar Jared Hancock
Browse files

events: Fix crash rendering avatar of deleted users

parent 0c803634
Branches
Tags
No related merge requests found
...@@ -1567,9 +1567,9 @@ class ThreadEvent extends VerySimpleModel { ...@@ -1567,9 +1567,9 @@ class ThreadEvent extends VerySimpleModel {
function getAvatar($size=null) { function getAvatar($size=null) {
if ($this->uid && $this->uid_type == 'S') if ($this->uid && $this->uid_type == 'S')
return $this->agent->getAvatar($size); return $this->agent ? $this->agent->getAvatar($size) : '';
if ($this->uid && $this->uid_type == 'U') if ($this->uid && $this->uid_type == 'U')
return $this->user->getAvatar($size); return $this->user ? $this->user->getAvatar($size) : '';
} }
function getUserName() { function getUserName() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment