From 7b0a6275bcfdad662a668c47d042b930ced0fc46 Mon Sep 17 00:00:00 2001 From: Jerod Santo Date: Thu, 29 Sep 2011 15:43:06 -0500 Subject: [PATCH] bug fix for some hosts: only clean output buffer if it is not empty --- common.php | 5 ++++- wordpress-console.php | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index acb5b96..ec6f114 100644 --- a/common.php +++ b/common.php @@ -14,7 +14,10 @@ session_start(); } -ob_end_clean(); +if ( ob_get_length() > 0 ) { + ob_end_clean(); +} + error_reporting( E_ALL ^ E_PARSE ); set_time_limit( 0 ); diff --git a/wordpress-console.php b/wordpress-console.php index 458a5d5..66ad80f 100644 --- a/wordpress-console.php +++ b/wordpress-console.php @@ -96,7 +96,5 @@ function WordPressConsole() { // legacy } } -error_reporting( E_ALL ); -ini_set( 'display_errors', 'On' ); new WordPressConsole; ?>