foreach() error on ezmlm lists page

DaveNotik - January 29, 2006 - 23:35
Project:Ezmlm
Version:HEAD
Component:Code
Category:bug report
Priority:critical
Assigned:Chris Johnson
Status:closed
Description

On admin/ezmlm, error on top:

warning: Invalid argument supplied for foreach() ... on line 243.

Drupal 4.7beta4, CVS ezmlm.

--D

#1

arturoramos - February 9, 2006 - 02:31

I am getting the same error on a different line. I imagine that it is the same error and you have merely changed the code...

Invalid argument supplied for foreach() in /home/.talley/lafamilia/nuestrosranchos.com/modules/ezmlm.module on line 210.

It appears to be related to the way that the script is implementing the unserialize or variable_get functions at the end of the script (line 282) since it is the first time I run the script and the persistent variable holding the script names should be blank and thus the count for $lists should be zero and the line should never even be called.

I am running Drupal 4.6.5 on PHP 5.1.2

http://www.nuestrosranchos.com

#2

arturoramos - February 9, 2006 - 03:31
Status:active» needs review

I whipped up this patch and the module seems to be working on my site now...

Delete line 210:
if (_ezmlm_get_lists() > 0) {

Replace with the following lines:
if (_ezmlm_get_count() > 0) {
_ezmlm_get_lists();

#3

Chris Johnson - February 10, 2006 - 21:41

Thanks for the patch suggestion. When I get home from Vancouver and get a little time, I'll fix ezmlm properly.

#4

Chris Johnson - February 23, 2006 - 18:28
Assigned to:Anonymous» Chris Johnson
Status:needs review» fixed

Both release 4.6 and 4.7 / HEAD have been patched to fix this problem.

Note that this module, ezmlm, will no longer be maintained after release 4.7 because its functionality has been superceded by the Mailing List Manager (mlm) module.

#5

Anonymous - March 9, 2006 - 18:30
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.