Title: Ajax PHP warning
Last modified: August 30, 2016

---

# Ajax PHP warning

 *  Resolved [maxwelton](https://wordpress.org/support/users/maxwelton/)
 * (@maxwelton)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/ajax-php-warning/)
 * Howdy, a minor issue:
 * If any of the checkbox options are unchecked, PHP returns a warning about undefined
   indexes on save in admin->appearance->widgets. (As you undoubtedly know, unchecked
   checkboxes are not in the _POST object.)
 * [https://wordpress.org/plugins/feature-a-page-widget/](https://wordpress.org/plugins/feature-a-page-widget/)

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

 *  Plugin Author [mrwweb](https://wordpress.org/support/users/mrwweb/)
 * (@mrwweb)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/ajax-php-warning/#post-6578695)
 * Thanks for the report.
 * If you can, could you copy/paste the errors into this thread. It’ll help me pinpoint
   the issue a big faster.
 * Also, are you seeing these errors in the Console or on the page? I’m trying to
   figure out where the AJAX is coming into this.
 *  Thread Starter [maxwelton](https://wordpress.org/support/users/maxwelton/)
 * (@maxwelton)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/ajax-php-warning/#post-6578746)
 * I’m using the plugin “query monitor” and this is its output to the JS console:
 *     ```
       === PHP Error in AJAX Response === query-monitor.js:198:5
       Object {
          type: "notice"
          message: "Undefined index: show_excerpt"
          file: "\wp-content\plugins\feature-a-page-widget\inc\fpw_widget_class.php"
          line: 224
          stack: Array[4]
             0: FPW_Widget->update()
             1: WP_Widget->update_callback()
             2: wp_ajax_save_widget()
             3: do_action('wp_ajax_save-widget')
       }
       ```
   
 * Lines 222 – 224 just need some isset() checks, I think:
 *     ```
       $instance['show_title'] = (bool) $new_instance['show_title'];
       $instance['show_image'] = (bool) $new_instance['show_image'];
       $instance['show_excerpt'] = (bool) $new_instance['show_excerpt'];
       $instance['show_read_more'] = (bool) $new_instance['show_read_more'];
       ```
   
 * I get a warning per unchecked option when saving the widget in admin->appearance-
   >widgets.
 *  Plugin Author [mrwweb](https://wordpress.org/support/users/mrwweb/)
 * (@mrwweb)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/ajax-php-warning/#post-6578826)
 * Very helpful. Thanks! I’ll try to get this fixed soon.
 *  Plugin Author [mrwweb](https://wordpress.org/support/users/mrwweb/)
 * (@mrwweb)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/ajax-php-warning/#post-6578993)
 * I was able to reproduce and will have a fix ready soon. However, I’m tempted 
   to say this isn’t worth pushing out an update for on its own. Is this causing
   you any noticeable functional problems? If not, I’ll fix it soon but sit on it
   until I can get in some meaningful other changes.
 * If you want a working patch, I will post that here for the meantime.
 *  Plugin Author [mrwweb](https://wordpress.org/support/users/mrwweb/)
 * (@mrwweb)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/ajax-php-warning/#post-6579148)
 * The 2.0.6 release today should resolve this issue. Thanks again for posting, 
   [@maxwelton](https://wordpress.org/support/users/maxwelton/).

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

The topic ‘Ajax PHP warning’ is closed to new replies.

 * ![](https://ps.w.org/feature-a-page-widget/assets/icon.svg?rev=974121)
 * [Feature A Page Widget](https://wordpress.org/plugins/feature-a-page-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/feature-a-page-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/feature-a-page-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/feature-a-page-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/feature-a-page-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/feature-a-page-widget/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [mrwweb](https://wordpress.org/support/users/mrwweb/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/ajax-php-warning/#post-6579148)
 * Status: resolved