• Resolved finnj

    (@finnj)


    I get this error message when I try to save a notification.

    If I check disable notification, I don’t get the error message.

    Notice: Undefined index: disabled in /wp-content/plugins/bnfw/includes/admin/class-bnfw-notification.php on line 373

    Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/bnfw/includes/admin/class-bnfw-notification.php:373) in /wp-includes/pluggable.php on line 1178

    And when I publish a post I get the following error 4 times (i guess one for each of the 4 users being emailed):
    Notice: Array to string conversion in /wp-content/plugins/bnfw/includes/engine/class-bnfw-engine.php on line 234

    https://www.ads-software.com/plugins/bnfw/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter finnj

    (@finnj)

    I forgot to add that the emails are sent and I have wp_debug set to true on my test site.

    Plugin Author bnfw

    (@voltronik)

    Hi finnj,
    Thanks for your message.

    Can you tell me what notification(s) this is happening for so that I can troubleshoot this further?

    Thanks,
    Jack

    Thread Starter finnj

    (@finnj)

    Hi Jack,

    It is just “New post published” and include all profiles
    (and I only use 2 fields in the notification: [guid] [post_content])

    I believe the first error is because you try to sanitize a text field, but I believe disabled is a checkbox
    'disabled' => sanitize_text_field( $_POST['disabled'] ),

    I dont know your code, but a suggestion could be to change it to:

    'disabled' => ( (isset($_POST['disabled']) && $_POST['disabled'] == 'true') ? true : false )

    The second error I have no idea ??

    Plugin Author bnfw

    (@voltronik)

    Thanks finnj,
    That’s really useful.

    I’ll do some investigating and let you know when i’ve found something and when it might be fixed.

    Speak shortly.
    Jack

    Plugin Author bnfw

    (@voltronik)

    This has now been fixed in v1.1.5 which has just been released.
    If you experience any other problems, please let me know.

    Thanks,
    Jack

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Undefined index: disabled’ is closed to new replies.