From ad30fe8695ea58291b1ff0a9709cf4663d3727aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 27 Feb 2014 16:34:12 +0100 Subject: [PATCH] Fix WhisperCommand when user does not exist --- file/lib/system/command/commands/WhisperCommand.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file/lib/system/command/commands/WhisperCommand.class.php b/file/lib/system/command/commands/WhisperCommand.class.php index 4226211..af4b958 100644 --- a/file/lib/system/command/commands/WhisperCommand.class.php +++ b/file/lib/system/command/commands/WhisperCommand.class.php @@ -30,7 +30,7 @@ public function __construct(\chat\system\command\CommandHandler $commandHandler) } $this->user = UserProfile::getUserProfileByUsername($username); - if (!$this->user->userID) throw new \chat\system\command\UserNotFoundException($username); + if (!$this->user) throw new \chat\system\command\UserNotFoundException($username); if (!\wcf\system\WCF::getSession()->getPermission('user.profile.cannotBeIgnored')) { if ($this->user->isIgnoredUser(\wcf\system\WCF::getUser()->userID)) { throw new \wcf\system\exception\UserInputException('text', \wcf\system\WCF::getLanguage()->getDynamicVariable('chat.error.whisper.ignoresYou', array('user' => $this->user)));