X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fprofile.php;h=077b3dc4302ba7ee9b3763215d294a2000b9a5e4;hb=7996ae8cd41fbb3ccd748eaed71a50f866269c6e;hp=fd61642c5cc7fc3c6eb53164d6bdb9b68765d396;hpb=c6d16b24399ceb05de8f008194103f6dd74979b1;p=platal.git diff --git a/modules/profile.php b/modules/profile.php index fd61642..077b3dc 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -443,10 +443,13 @@ class ProfileModule extends PLModule ORDER BY id', $sssect); $page->changeTpl('profile/jobs.alternates.tpl', NO_SKIN); - $alternate = $res->next(); - $alternates = $alternate['name']; - while ($alternate = $res->next()) { - $alternates .= ', ' . $alternate['name']; + $alternates = ''; + if ($res->total() > 0) { + $alternate = $res->next(); + $alternates = $alternate['name']; + while ($alternate = $res->next()) { + $alternates .= ', ' . $alternate['name']; + } } $page->assign('alternates', $alternates); }