Title: PHP Notice with Debug Enabled
Last modified: August 21, 2016

---

# PHP Notice with Debug Enabled

 *  [DaveE](https://wordpress.org/support/users/dpe415/)
 * (@dpe415)
 * [12 years ago](https://wordpress.org/support/topic/php-notice-with-debug-enabled/)
 * Hello Simon,
 * Custom Post Templates is an incredibly helpful plugin. However, I’ve started 
   to notice PHP Notices for new/unsaved posts when using the plugin with debug 
   enabled. The notice is:
 * `NOTICE: wp-content/plugins/custom-post-template/custom-post-templates.php:112-
   Undefined index: custom_post_template_present`
 * This was easy to fix by checking to see if the `custom_post_template_present`
   POST variable is set before continuing. I just added the following right above
   line 112:
 * `if( ! isset( $_POST[ 'custom_post_template_present' ] ) ) return;`
 * Any chance you could incorporate this into a future update to the plugin?
 * Thank you!
 * [https://wordpress.org/plugins/custom-post-template/](https://wordpress.org/plugins/custom-post-template/)

The topic ‘PHP Notice with Debug Enabled’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-post-template.svg)
 * [Custom Post Template](https://wordpress.org/plugins/custom-post-template/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-template/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-template/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-template/reviews/)

## Tags

 * [debugging](https://wordpress.org/support/topic-tag/debugging/)
 * [PHP Notice](https://wordpress.org/support/topic-tag/php-notice/)

 * 0 replies
 * 1 participant
 * Last reply from: [DaveE](https://wordpress.org/support/users/dpe415/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/php-notice-with-debug-enabled/)
 * Status: not a support question