Title: Ack! PHP error when adding new subscriber
Last modified: August 21, 2016

---

# Ack! PHP error when adding new subscriber

 *  Resolved [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/ack-php-error-when-adding-new-subscriber/)
 * I’m getting an error when trying to add a new subscriber and I want to make sure
   it is linked to the Subscribe2 plugin.
 * When I add a new user, I get this error returned:
 *     ```
       Notice: Undefined index: reg_subscribe in /home/katmedia/public_html/testing/wp-content/plugins/villagemail/classes/class-s2-core.php on line 2465
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/katmedia/public_html/testing/wp-content/plugins/villagemail/classes/class-s2-core.php:2465) in /home/katmedia/public_html/testing/wp-includes/pluggable.php on line 899
       ```
   
 * I looked on the line specified in the Notice and it’s this one:
 * `if ( 'yes' == $this->subscribe2_options['autosub'] || ( 'on' == $_POST['reg_subscribe']&&'
   wpreg' == $this->subscribe2_options['autosub'] ) ) {`
 * I haven’t had this issue before but I’m not sure how to troubleshoot it either–
   can you help?
 * Kat
 * [http://wordpress.org/plugins/subscribe2/](http://wordpress.org/plugins/subscribe2/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/ack-php-error-when-adding-new-subscriber/#post-4397769)
 * Just realized … I forgot to say I can go right back into the admin after this
   so it doesn’t break the site, mostly. 😉
 * Also, the above is returned whether I add a new subscriber or a new admin, so
   it’s not affected by ‘role’. Don’t know if that helps or not, since I’m still
   newer to php.
 * pps – I renamed the Subscribe2 plugin VillageMail for someone’s site I’m working
   with – so the code is the same, they just wanted it called something more cute
   and cuddly … er, user friendly. 😀
 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/ack-php-error-when-adding-new-subscriber/#post-4397909)
 * [@kat](https://wordpress.org/support/users/kat/),
 * Thanks for that bug report. If you replaced that line:
    `if ( 'yes' == $this-
   >subscribe2_options['autosub'] || ( 'on' == $_POST['reg_subscribe'] && 'wpreg'
   == $this->subscribe2_options['autosub'] ) ) {`
 * With this:
    `if ( 'yes' == $this->subscribe2_options['autosub'] || ( isset($_POST['
   reg_subscribe']) && 'on' == $_POST['reg_subscribe'] && 'wpreg' == $this->subscribe2_options['
   autosub'] ) ) {`
 * Does that resolve the PHP Notice message?
 *  Thread Starter [Katrina “Kat” Moody](https://wordpress.org/support/users/katmoody/)
 * (@katmoody)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/ack-php-error-when-adding-new-subscriber/#post-4397945)
 * Yes it does! Thanks for replying so quickly! I dropped you a small tip via your
   site – would totally have sent more if I had it! Also rated and left a review.
   Thanks so much!
 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/ack-php-error-when-adding-new-subscriber/#post-4397962)
 * [@kat](https://wordpress.org/support/users/kat/),
 * Many thanks for the donation and positive review. I’ll get that small change 
   rolled into the next version of the code too.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Ack! PHP error when adding new subscriber’ is closed to new replies.

 * ![](https://ps.w.org/subscribe2/assets/icon-256x256.png?rev=2318630)
 * [Subscribe2 - Form, Email Subscribers & Newsletters](https://wordpress.org/plugins/subscribe2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/subscribe2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/subscribe2/)
 * [Active Topics](https://wordpress.org/support/plugin/subscribe2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/subscribe2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/subscribe2/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 4 replies
 * 2 participants
 * Last reply from: [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/ack-php-error-when-adding-new-subscriber/#post-4397962)
 * Status: resolved