• 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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Katrina “Kat” Moody

    (@katmoody)

    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. 😀

    @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

    (@katmoody)

    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!

    @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.