Title: Bug Found!
Last modified: August 31, 2016

---

# Bug Found!

 *  Resolved [Kimberly](https://wordpress.org/support/users/amiga500/)
 * (@amiga500)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/bug-found-12/)
 * In **class.akismet.php** file line 1122 it has:
 *     ```
       if ( apply_filters( 'akismet_debug_log', defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ) {
       ```
   
 * According to WordPress documents WP_DEBUG_LOG should only be usable when WP_DEBUG
   is set to true. The line above only checks that WP_DEBUG_LOG is true but there
   are countless sites who will have WP_DEBUG = false but WP_DEBUG_LOG = true…this
   is so it makes it easy for one to enable debugging right away via WP_DEBUG=true
   without having to also change the boolean for the other values too.
 * so the CORRECT WAY to implement this line is:
 *     ```
       if ( apply_filters( 'akismet_debug_log', defined( 'WP_DEBUG' ) && WP_DEBUG && defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) ) {
       ```
   
 * Right now, even when WP_DEBUG is off Akismet writes endless logs to error_log
   because WP_DEBUG_LOG = true, but WP_DEBUG=false. Yikes!
 * Please fix
 * [https://wordpress.org/plugins/akismet/](https://wordpress.org/plugins/akismet/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Christopher Finke](https://wordpress.org/support/users/cfinke/)
 * (@cfinke)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/bug-found-12/#post-7305638)
 * Nice catch, I’ve committed your fix in revision 1402654.

Viewing 1 replies (of 1 total)

The topic ‘Bug Found!’ is closed to new replies.

 * ![](https://ps.w.org/akismet/assets/icon-256x256.png?rev=2818463)
 * [Akismet Anti-spam: Spam Protection](https://wordpress.org/plugins/akismet/)
 * [Support Threads](https://wordpress.org/support/plugin/akismet/)
 * [Active Topics](https://wordpress.org/support/plugin/akismet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/akismet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/akismet/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Christopher Finke](https://wordpress.org/support/users/cfinke/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/bug-found-12/#post-7305638)
 * Status: resolved