From ca667fbfa2074dcc87eea30ac40c7f158949a81a Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 10 Aug 2015 09:06:23 -0500 Subject: [PATCH] events: Fix crash rendering avatar of deleted users --- include/class.thread.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class.thread.php b/include/class.thread.php index bf4d4010e..0636df348 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -1567,9 +1567,9 @@ class ThreadEvent extends VerySimpleModel { function getAvatar($size=null) { 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') - return $this->user->getAvatar($size); + return $this->user ? $this->user->getAvatar($size) : ''; } function getUserName() { -- GitLab