From 62bd4cae4ffd9d9376558a6210690d226645335c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 7 Aug 2009 13:03:00 -0600 Subject: [PATCH] Better way to check for unexpected output --- imp/ajax.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/imp/ajax.php b/imp/ajax.php index 3bb8af30c..a04b59816 100644 --- a/imp/ajax.php +++ b/imp/ajax.php @@ -795,10 +795,8 @@ case 'FetchmailDialog': // Clear the output buffer that we started above, and log any unexpected // output at a DEBUG level. -$errors = ob_get_clean(); -if ($errors) { - Horde::logMessage('DIMP: unexpected output: ' . - $errors, __FILE__, __LINE__, PEAR_LOG_DEBUG); +if (ob_get_length()) { + Horde::logMessage('DIMP: unexpected output: ' . ob_get_clean(), __FILE__, __LINE__, PEAR_LOG_DEBUG); } // Send the final result. -- 2.11.0