I create just one entry for a mailinglist, When i fill the input form on the block, only the email address, and press subscribe, i get this error:

warning: implode(): Bad arguments. in /home/mibur/public_html/drupal-4.5/modules/ezmlm/ezmlm.module on line 141.

After this i get no ezmlm subscribe message to confirm the subscribe command. Perhaps this is because there is no checkbox for the mailinglist. When i create two mailinglists, there is no error. I have only one mailinglist for this site, so there should be a option for that.

Thanks mibur

Comments

Chris Johnson’s picture

Assigned: mibur » Chris Johnson

Yup, there's a bug. Thank you for reporting it.

I have fixed the code and committed the fix to CVS in the module's 4.5 branch. I'm not sure the package will automatically get rebuilt.

Here's the patch (it's a one-line change at line 155:

--- ezmlm.module        13 Feb 2005 03:52:26 -0000      1.8
+++ ezmlm.module        14 Feb 2005 05:51:39 -0000
@@ -1,6 +1,6 @@
 <?php
-// $Id: ezmlm.module,v 1.8 2005/02/13 03:52:26 chris Exp $
-// $Name:  $
+// $Id: ezmlm.module,v 1.6 2004/10/01 00:08:31 uwe Exp $
+// $Name$

 /**
  * @file
@@ -138,6 +138,7 @@ function _ezmlm_subscribe_process() {
       $mylists[] = trim($list_email);
     }
   }
+
   return Array(t('You will receive a confirmation email in few minutes to register in the following %lists: ', array('%lists' => format_plural(count($mylists), 'list', 'lists'))) . implode(', ', $mylists), 'success');
 }

@@ -155,7 +156,7 @@ function _ezmlm_subscribe_form() {
     $output = t('There are no lists available for subscription.');
   }
   elseif (count($lists) == 1) {
-      list($list_text, $list_email) = $lists[0];
+      list($list_text, $list_email) = each($lists); // list() only works on numeric arrays
       $output .= form_hidden('ezmlm_list]['. trim($list_email), 1);
   }
   else {
Anonymous’s picture

Hi Chris.

Works for me thanks.

Mibur.

Anonymous’s picture