From: Florent Bruneau Date: Sun, 11 Apr 2010 14:01:25 +0000 (+0200) Subject: Fix Recoverable Errors when fetching jobs and addresses from the profile. X-Git-Tag: xorg/1.0.0~299 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=61ee68c710d93fe2de9484ef95b6652e6ac48547;p=platal.git Fix Recoverable Errors when fetching jobs and addresses from the profile. Signed-off-by: Florent Bruneau --- diff --git a/classes/profile.php b/classes/profile.php index 44c184f..53d9100 100644 --- a/classes/profile.php +++ b/classes/profile.php @@ -451,7 +451,10 @@ class Profile public function getAddresses($flags, $limit = null) { if ($this->addresses == null && !$this->fetched(self::FETCH_ADDRESSES)) { - $this->setAddresses($this->getProfileField(self::FETCH_ADDRESSES)); + $addr = $this->getProfileField(self::FETCH_ADDRESSES); + if ($addr) { + $this->setAddresses($addr); + } } if ($this->addresses == null) { @@ -582,7 +585,10 @@ class Profile public function getJobs($flags, $limit = null) { if ($this->jobs == null && !$this->fetched(self::FETCH_JOBS)) { - $this->setJobs($this->getProfileField(self::FETCH_JOBS)); + $jobs = $this->getProfileField(self::FETCH_JOBS); + if ($jobs) { + $this->setJobs($jobs); + } } if ($this->jobs == null) {