Return a render array on the STS settings page rather than a string.
authorLev Tsypin
Wed, 30 Nov 2011 20:13:04 +0000 (12:13 -0800)
committerLev Tsypin
Wed, 30 Nov 2011 20:13:04 +0000 (12:13 -0800)
modules/mailchimp_sts/mailchimp_sts.admin.inc

index 232e426..1c50d40 100644 (file)
@@ -30,9 +30,12 @@ function mailchimp_sts_admin_page() {
         '!reports' => l(t(' MailChimp STS quotas, statistics, and reports'), 'admin/reports/mailchimp_sts'),
         '!STS' => l(t('MailChimp STS API'), 'http://apidocs.mailchimp.com/sts/1.0/')
       ));
-    $form = drupal_get_form('mailchimp_sts_admin_settings', $emails);
 
-    return $message . drupal_render($form);
+    // return render array.
+    return array(
+      'message' => array('#markup' => $message),
+      'form' => drupal_get_form('mailchimp_sts_admin_settings', $emails)
+    );
   }
   else {
     drupal_set_message(