Title: WP_DEBUG notices
Last modified: August 30, 2016

---

# WP_DEBUG notices

 *  [Jenny Belanger](https://wordpress.org/support/users/jennybelanger/)
 * (@jennybelanger)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/wp_debug-notices-8/)
 * If you add the following code to wp-config.php:
 * `define( 'WP_DEBUG', true );`
 * This plugin will generate the following notice if `apply_filters( 'the_content'...)`
   is used outside of the loop:
 * `PHP Notice: Trying to get property of non-object in /wp-content/plugins/wp-lightbox-
   2/wp-lightbox-2.php on line 155`
 * To prevent this notice from appearing, line 155 should be changed from:
 * `$id = ($post->ID) ? $post->ID : -1;`
 * To:
 * `$id = isset($post->ID) ? $post->ID : -1;`
 * Thanks!
 * [https://wordpress.org/plugins/wp-lightbox-2/](https://wordpress.org/plugins/wp-lightbox-2/)

The topic ‘WP_DEBUG notices’ is closed to new replies.

 * ![](https://ps.w.org/wp-lightbox-2/assets/icon-128x128.png?rev=1093845)
 * [WP Lightbox 2](https://wordpress.org/plugins/wp-lightbox-2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-lightbox-2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-lightbox-2/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-lightbox-2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-lightbox-2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-lightbox-2/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Jenny Belanger](https://wordpress.org/support/users/jennybelanger/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/wp_debug-notices-8/)
 * Status: not resolved