From 6fb5095197f47a916f59e304d3cee7d694c7c7ca Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 29 Nov 2012 17:58:24 +0100 Subject: add function to safly end output buffering --- lib/util.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/util.php b/lib/util.php index ec3e91893d3..d3118bfb06f 100755 --- a/lib/util.php +++ b/lib/util.php @@ -575,7 +575,17 @@ class OC_Util { } } - /* + /** + * clear all levels of output buffering + */ + public static function obEnd(){ + while (ob_get_level()) { + ob_end_clean(); + } + } + + + /** * @brief Generates a cryptographical secure pseudorandom string * @param Int with the length of the random string * @return String -- cgit v1.2.3