• Resolved Marco Chiesi

    (@marcochiesi)


    When editing the sidebars for the search page with WP_DEBUG enabled, I get the following notices:

    Notice: Undefined index: post_id in /home/.../public_html/wp-content/plugins/wp-page-widget/wp-page-widgets.php on line 1037
    
    Notice: Undefined index: tag_id in /home/.../public_html/wp-content/plugins/wp-page-widget/wp-page-widgets.php on line 1037

    This happens for all kinds of widgets.

    The line of code causing the issue is the following

    if (!$_POST['post_id'] && !$_POST['tag_id'] && !$_POST['search_page'])
      die('-1');

    I think it should be sufficient to put a few isset calls before checking the $_POST[...] vars.

    Thank you.

    https://wordpress.org/plugins/wp-page-widget/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Errors with WP_DEBUG enabled’ is closed to new replies.