Popup message showing content from a block
You should not be printing popup_message_show_message(); it just includes all the necessary files and show your message. Just remove the print part and try that way.

function popup_message_show_message($popup_message_parameters) {
  drupal_add_js(array(
      'popup_message' =&gt; $popup_message_parameters
    ), 'setting');
  drupal_add_js('misc/jquery.cookie.js');
  drupal_add_js(drupal_get_path('module', 'popup_message') . '/js/popup.js');
  $default_style = drupal_get_path('module', 'popup_message') . '/styles/default/' . POPUP_MESSAGE_CSS_NAME;
  $style = variable_get('popup_message_style', $default_style);
  if (!file_exists($style)) {
    $style = $default_style;
  }
  drupal_add_css($style);
}


Also, never use print_r() directly. Either use this:

drupal_set_message('&lt;pre&gt;' . print_r($variable, TRUE) . '&lt;/pre&gt;');


Or install Devel module and call the dpm() function this way: dpm($variable). It will use Krumo to display all attributes / elements, which is times better for debugging and will not cause any errors as print_r().