Merge remote branch 'origin/xorg/maint' into xorg/1.0.2/master
[platal.git] / modules / register.php
index af6b4cc..9c235f9 100644 (file)
@@ -386,8 +386,13 @@ class RegisterModule extends PLModule
                         XDB::execute('INSERT IGNORE INTO  group_members (uid, asso_id)
                                                   VALUES  ({?}, {?})',
                                      $uid, $asso_id);
-                        $mmlist = new MMList($user);
-                        $mmlist->subscribe("promo" . $yearpromo);
+                        try {
+                            $mmlist = new MMList($user);
+                            $mmlist->subscribe("promo" . $yearpromo);
+                        } catch (Exception $e) {
+                            PlErrorReport::report($e);
+                            $page->trigError("L'inscription à la liste promo" . $yearpromo . " a échouée.");
+                        }
                     }
                     break;
                 case 'nl':