From bea1cb6e1d0fcc674cc0515ba3aa97893d6be593 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 23 Dec 2010 02:11:17 -0700 Subject: [PATCH] Use Horde::[start|end]Buffer() --- horde/services/ajax.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/horde/services/ajax.php b/horde/services/ajax.php index a11007f54..4c253ee1b 100644 --- a/horde/services/ajax.php +++ b/horde/services/ajax.php @@ -53,7 +53,7 @@ try { // Open an output buffer to ensure that we catch errors that might break JSON // encoding. -ob_start(); +Horde::startBuffer(); $ajax = $injector->getInstance('Horde_Core_Factory_Ajax')->create($app, Horde_Variables::getDefaultVariables(), $action); try { @@ -65,8 +65,8 @@ try { // Clear the output buffer that we started above, and log any unexpected // output at a DEBUG level. -if (ob_get_length()) { - Horde::logMessage('Unexpected output: ' . ob_get_clean(), 'DEBUG'); +if ($out = Horde::endBuffer()) { + Horde::logMessage('Unexpected output: ' . $out, 'DEBUG'); } // Send the final result. -- 2.11.0