when no messages are set, line 43 sets $saved_messages to NULL
$saved_messages = drupal_set_message();

latter when iterating isset($saved_messages) yields true
and foreach() throws the error: Invalid argument supplied for foreach() line 84

line 83 & 84

if (isset($saved_messages)) {
  foreach ($saved_messages as $type => $types_messages) {

Comments

arhak’s picture

Status: Active » Needs review

seems it would be ok to use if (empty($saved_messages)) {...} instead

dave reid’s picture

Status: Needs review » Postponed (maintainer needs more info)

if $saved_messages = NULL, then isset($saved_messages) should return FALSE. Can you try the latest 6.x-1.x-dev and see if you get the same error?

arhak’s picture

certainly I'm that wrong
phew, what a stumble

about testing it again.. well, do you know how difficult is to attempt running cron without yielding any message
just no right now, I'm XProgramming by now, my apologies

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

Marking as fixed.

Status: Fixed » Closed (fixed)

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