If you set up a mailing list, place its block, then remove it, you'll get two issues cycling in your logs. A notice in mailing_list_forms() that the $forms array is not defined when returned and a log entry from mailing_list_block_view() that the list cannot be loaded.

I'm not sold on the watchdog log, but even if keep it there, it should be worded properly. The mailing lists have numeric indexes, so the warning looks odd with the numeric expanding to "Unable to load mailing list form on 3 block". I think it would be best to remove this, so you'll find that in my suggested patch. Instead of putting out warnings if we cannot load the list, we should rebuild the blocks when we remove a list, and that should remove the block proper.

Also, adding a simple $forms = array() to initialize the forms array if there are no lists.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

FileSize
1.92 KB

Of course it helps if I actually name the variable $forms.

manuel.adan’s picture

Issue summary: View changes
Status: Needs review » Fixed
FileSize
1.2 KB

Committed. Closing some old issues...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.