From 61ee68c710d93fe2de9484ef95b6652e6ac48547 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 11 Apr 2010 16:01:25 +0200 Subject: [PATCH] Fix Recoverable Errors when fetching jobs and addresses from the profile. Signed-off-by: Florent Bruneau --- classes/profile.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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) { -- 2.1.4