Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

[Patch] Fix for ob_end_clean() PHP notice when using caching plugins

$
0
0

Replies: 0

This is a great plugin! We use it on many websites. Thanks for making it.

In some configurations, we’re seeing a PHP notice:

Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /wp-content/plugins/minimal-coming-soon-maintenance-mode/framework/public/include/functions.php on line 14

I’ve put together a simple patch:
https://github.com/blueblazeassociates/minimal-coming-soon-maintenance-mode/commit/68438e8b9f879678bb1c882f5297d4918ff797d9

The patch tests the output buffer to make sure it contains something before clearing it.

To replicate, try this:
1. Activate WordPress debug mode through WP_DEBUG constant.
2. Install wp-super-cache along with this plugin.
3. Activate the wp-super-cache plugin, but with it’s settings, turn caching function off. (I’m not sure if this step is needed but it is my current configuration.)
4. Activate maintenance mode.

In my test site, I’ll now see the above PHP notice on the maintenance page. The maintenance mode still works, it is just the notice appears.

Thanks!


Viewing all articles
Browse latest Browse all 67836

Trending Articles