WP_DEBUG notices
-
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!
- The topic ‘WP_DEBUG notices’ is closed to new replies.