On admin/ezmlm, error on top:

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

Drupal 4.7beta4, CVS ezmlm.

--D

Comments

arturoramos’s picture

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

arturoramos’s picture

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();

Chris Johnson’s picture

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

Chris Johnson’s picture

Assigned: Unassigned » 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)