diff --git a/privatemsg.pages.inc b/privatemsg.pages.inc index 63ddaf4..3d9ee9c 100644 --- a/privatemsg.pages.inc +++ b/privatemsg.pages.inc @@ -233,12 +233,15 @@ function privatemsg_list_submit($form, &$form_state) { } // Load all keys where the value is the current op. - $keys = array_keys($form_state['values'], $form_state['values']['op']); - - // Loop over them and detect if a matching button was pressed. - foreach ($keys as $key) { - if ($key != 'op' && isset($operations[$key])) { - $operation = $operations[$key]; + + if (!empty($form_state['values']['op'])) { + $keys = array_keys($form_state['values'], $form_state['values']['op']); + + // Loop over them and detect if a matching button was pressed. + foreach ($keys as $key) { + if ($key != 'op' && isset($operations[$key])) { + $operation = $operations[$key]; + } } }