• Resolved vpr

    (@vpr)


    When WP_DEBUG is set to true the plugin throws PHP notice “Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in /wp-content/plugins/html-cleanup/html-cleanup.php on line 45” which breaks all admin AJAX functionality. Disabling the plugin or changing WP_DEBUG to false makes it work again. The problem code:

    function html_cleanup_buffer_end() {
      ob_end_flush();
    }

    Wrapping the function with output buffer check fixes this:

    function html_cleanup_buffer_end() {
      if(ob_get_level() !== 0) {
        ob_end_flush();
      }
    }

    https://www.ads-software.com/plugins/html-cleanup/

Viewing 1 replies (of 1 total)
  • Plugin Author davidlyness

    (@davidlyness)

    Thanks for the bug report! I’ve pushed v1.2.3 to the plugin repository that should fix this issue – feel free to reopen this thread if you’re still having this problem with the new version.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Notice Breaks Admin AJAX’ is closed to new replies.