Title: Errors with WP_DEBUG enabled
Last modified: August 22, 2016

---

# Errors with WP_DEBUG enabled

 *  Resolved [Marco Chiesi](https://wordpress.org/support/users/marcochiesi/)
 * (@marcochiesi)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/errors-with-wp_debug-enabled/)
 * 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/](https://wordpress.org/plugins/wp-page-widget/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [CodeAndMore](https://wordpress.org/support/users/codeandmore/)
 * (@codeandmore)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/errors-with-wp_debug-enabled/#post-5327610)
 * That should work now.
    Thanks.

Viewing 1 replies (of 1 total)

The topic ‘Errors with WP_DEBUG enabled’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-page-widget_fcfbfc.svg)
 * [WP Page Widget](https://wordpress.org/plugins/wp-page-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-page-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-page-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-page-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-page-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-page-widget/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [CodeAndMore](https://wordpress.org/support/users/codeandmore/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/errors-with-wp_debug-enabled/#post-5327610)
 * Status: resolved