Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Subscriptions form element is displayed even if there is nothing to subscribe to. The solution is simple, add an is_array() check, as below:
125 if(is_array($options)) {
126 $form['mailout'] = array(
127 '#type' => 'checkboxes',
128 '#options' => $options,
129 '#title' => t('Subscriptions'),
130 );
131 }
Regards,
Gábor