fixed ob_end_flush error in wp-admin while debug is on
fixed ob_end_flush error in wp-admin while debug is on

file:a/readme.txt -> file:b/readme.txt
--- a/readme.txt
+++ b/readme.txt
@@ -1,10 +1,10 @@
 === Varnish Caching ===
-Donate link: http://git.razvi.ro/
+Donate link: https://www.paypal.me/razvanstanga
 Contributors: razvanstanga
 Tags: varnish, purge, cache, caching, optimization, performance, traffic
 Requires at least: 4.0
 Tested up to: 4.7
-Stable tag: 1.5.4
+Stable tag: 1.5.5
 License: GPLv2 or later
 
 Wordpress Varnish Cache 3.x/4.x integration
@@ -116,6 +116,9 @@
 
 == Changelog ==
 
+= 1.5.5 =
+* fixed ob_end_flush error in wp-admin while debug is on. thanks @samlangdon
+
 = 1.5.4 =
 * improvements to Varnish configs like websocket support, remove the Google Analytics added parameters, strip hash, remove unnecessary cookies. thanks @pavelprischepa
 

--- a/vcaching.php
+++ b/vcaching.php
@@ -3,7 +3,7 @@
 Plugin Name: Varnish Caching
 Plugin URI: http://wordpress.org/extend/plugins/vcaching/
 Description: WordPress Varnish Cache integration.
-Version: 1.5.4
+Version: 1.5.5
 Author: Razvan Stanga
 Author URI: http://git.razvi.ro/
 License: http://www.apache.org/licenses/LICENSE-2.0
@@ -165,7 +165,9 @@
 
     public function buffer_end()
     {
-        ob_end_flush();
+        if (ob_get_level() > 0) {
+            ob_end_flush();
+        }
     }
 
     protected function setup_ips_to_hosts()

comments