From: Michael M Slusarz Date: Thu, 23 Dec 2010 09:11:17 +0000 (-0700) Subject: Use Horde::[start|end]Buffer() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=bea1cb6e1d0fcc674cc0515ba3aa97893d6be593;p=horde.git Use Horde::[start|end]Buffer() --- 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.