Better way to check for unexpected output
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 7 Aug 2009 19:03:00 +0000 (13:03 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 7 Aug 2009 19:03:00 +0000 (13:03 -0600)
imp/ajax.php

index 3bb8af3..a04b598 100644 (file)
@@ -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.