When I modify the line 154 to have array('error') as the second parameter instaed of the default string, it works fine. Otherwise I recieve the error:

warning: strtr(): The second argument is not an array. in /home/httpd/vhosts/domain.net/httpdocs/includes/common.inc on line 504.
warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/domain.net/httpdocs/includes/common.inc:344) in /home/httpd/vhosts/domain.net/httpdocs/includes/common.inc on line 155.

optin.module [NEW Line 154]: drupal_set_message(t('Please create a checkbox to use in the opt-in process. When finished, return to finish editing the opt-in.', array('error')));

Although this produces an extra line in the error message box it fixed the error.

Comments

njivy’s picture

Actually, I had misplaced a parenthasis for t() in drupal_set_message(). I updated the code, so it looks like drupal_set_message(t('Please create a checkbox to use in the opt-in process. When finished, return to finish editing the opt-in.'), 'error');

Thanks for the tip.

Anonymous’s picture