X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Ferrors.inc;h=f2cfe1c0fc1b113c6fee2e58706969c0b2484b27;hb=4235547f197afc92d317f3137419421d8660c168;hp=a9b68898498fb0e4f9854e678ad155b86a3bfa57;hpb=fab37f3012d8b02fa039f5c7b6f37100bec4d1b2;p=fa-stable.git
diff --git a/includes/errors.inc b/includes/errors.inc
index a9b68898..f2cfe1c0 100644
--- a/includes/errors.inc
+++ b/includes/errors.inc
@@ -84,9 +84,9 @@ function error_box() {
global $before_box;
echo "
";
- $before_box = ob_get_clean(); // save html content before error box
+
// Necessary restart instead of get_contents/clean calls due to a bug in php 4.3.2
- register_shutdown_function('end_flush');
+ $before_box = ob_get_clean(); // save html content before error box
ob_start('output_html');
echo "
";
}
@@ -94,7 +94,12 @@ function error_box() {
Helper to avoid sparse log notices.
*/
function end_flush () {
- if (ob_get_level()) ob_end_flush();
+ global $Ajax;
+
+ if (isset($Ajax))
+ $Ajax->run();
+ // flush all output buffers (works also with exit inside any div levels)
+ while(ob_get_level()) ob_end_flush();
}
function display_db_error($msg, $sql_statement=null, $exit=true)