From: Raphaël Barrois Date: Tue, 23 Aug 2011 22:55:07 +0000 (+0200) Subject: Minor bugfix in User class. X-Git-Tag: xorg/1.1.3~16 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=7ea511607768388d246e71a1ac7d957c8993d036;hp=63954a5cda90fd426e81494b12ec63454ba8e9d7;p=platal.git Minor bugfix in User class. Signed-off-by: Raphaël Barrois --- 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;