X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=includes%2Ferrors.inc;h=f2cfe1c0fc1b113c6fee2e58706969c0b2484b27;hb=8438a027a31b2625f21db52a3cbff254b739a221;hp=500d7e606ada7e1eb0020d996d1c39e313e2af74;hpb=8eacc919cc5fce2d2ddd69a650c33c881828c76d;p=fa-stable.git diff --git a/includes/errors.inc b/includes/errors.inc index 500d7e60..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 "
"; } @@ -98,8 +98,8 @@ function end_flush () { if (isset($Ajax)) $Ajax->run(); - - if (ob_get_level()) ob_end_flush(); + // 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)