• Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush ...wp-content\plugins\site-url-shortcode\site-url-shortcode.php on line 22

    This happens (for example) when running WordPress without theme support (and not issuing any output). One may do this when making a CLI script which one want’s to use wordpress functions in but doesn’t need the front end.

    It can be simply fixed by doing this

    // Cleanup
        add_action('shutdown', function() {
            if(ob_get_level()) ob_end_flush();
        });

    Specifically, by adding if(ob_get_level()) to check if there is an output buffer

    Cheers!

  • The topic ‘Plugin issues notice in some edge cases’ is closed to new replies.