From e44e7234c528fa186f080af20317a23f3a414784 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Fri, 16 Nov 2012 23:06:51 +0100 Subject: [PATCH] Fix display of an empty or non-moderated list. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- modules/lists/lists.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/lists/lists.inc.php b/modules/lists/lists.inc.php index f167ab2..5d2b8f4 100644 --- a/modules/lists/lists.inc.php +++ b/modules/lists/lists.inc.php @@ -43,9 +43,11 @@ function list_sort_owners($emails, $tri_promo = true) $pf = new ProfileFilter(new UFC_Email($emails)); $it = $pf->iterProfiles(); - while ($p = $it->next()) { - $members[$p->owner_id]['user']->setPrefetchedProfile($p); - $members[$p->owner_id]['profile'] = $p; + if ($it) { + while ($p = $it->next()) { + $members[$p->owner_id]['user']->setPrefetchedProfile($p); + $members[$p->owner_id]['profile'] = $p; + } } foreach ($emails as $email) { -- 2.1.4