From 7ea511607768388d246e71a1ac7d957c8993d036 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Wed, 24 Aug 2011 00:55:07 +0200 Subject: [PATCH] Minor bugfix in User class. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/user.php b/classes/user.php index bd58db8..eb3c855 100644 --- a/classes/user.php +++ b/classes/user.php @@ -363,7 +363,7 @@ class User extends PlUser if (!$this->_profile_fetched || $forceFetch) { $this->_profile_fetched = true; $this->_profile = Profile::get($this, $fields, $visibility); - } else if (!$this->_profile->visibility->equals($visibility)) { + } else if ($this->_profile !== null && !$this->_profile->visibility->equals($visibility)) { return Profile::get($this, $fields, $visibility); } return $this->_profile; -- 2.1.4