• Resolved stilldreaming

    (@stilldreaming)


    Really like your plugin. Noticed a minor bug, which is as follows.

    In the plugin, where the WP_DEBUG_LOG constant is processed it says:

    return defined('WP_DEBUG_LOG') && WP_DEBUG_LOG ? esc_html__('Enabled', 'dashboard-widgets-suite') : esc_html__('Disabled', 'dashboard-widgets-suite');

    This does not take into account the fact that WP_DEBUG_LOG might be a filename.

    See here for the explanation:

    Debugging in WordPress

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Thanks for reporting, will get it fixed up for the next plugin update.

    Also thank you for the great review, very much appreciated @stilldreaming ??

    • This reply was modified 4 years, 10 months ago by Jeff Starr.
    Thread Starter stilldreaming

    (@stilldreaming)

    You’re welcome. Great plugin.

    Plugin Author Jeff Starr

    (@specialk)

    Hey just to follow up with this, the code in question:

    defined('WP_DEBUG_LOG') && WP_DEBUG_LOG ? ...

    Returns the correct value for either case: when the value is a path/filename, PHP interprets that as “true”, so the code works either way.

    Unless I am missing something, which certainly is possible this early in the day.

    Thread Starter stilldreaming

    (@stilldreaming)

    Well, in a way you are right. If WP_DEBUG_LOG is true the plugin displays “Enabled”, which is correct of course. The log is saved to the default wp-content/debug.log. WP_DEBUG_LOG can be set to a filename. If someone does that the plugin displays “Enabled”, also quite correct.

    But…. wouldn’t it be nice that the plugin displays the content of WP_DEBUG_LOG (if it is not true or false). It is a case of “Enabled, but storing in the following log file…”.

    Plugin Author Jeff Starr

    (@specialk)

    Yeah that’s actually a good idea, I will improve the logic to display more accurate results in the next plugin update. Thanks for explaining your idea further.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up, this feature is added in the next version of DWS. Should be available soon.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP_DEBUG_LOG values’ is closed to new replies.