X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fsession.inc;h=a08344aea10fad53ead55414cd55cf64cf7359e5;hb=cb667e6d69ccd818ca1a10cff8a21a41dc3b4af5;hp=9ba28f4964619c4b9ddad36d3e507c7c0046453a;hpb=bc426821d8ae6319bd9394ac275bb700e6394fc3;p=fa-stable.git diff --git a/includes/session.inc b/includes/session.inc index 9ba28f49..a08344ae 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -11,7 +11,15 @@ function output_html($text) { - global $before_box; + global $before_box, $Ajax, $messages; + // Fatal errors are not send to error_handler, + // so we must check the output + if ($text && preg_match('/\bFatal error(<.*?>)?:(.*)/i', $text, $m)) { + $Ajax->aCommands = array(); // Don't update page via ajax on errors + $text = preg_replace('/\bFatal error(<.*?>)?:(.*)/i','', $text); + $messages[] = array(E_ERROR, $m[2], null, null); + } + $Ajax->run(); return in_ajax() ? fmt_errors() : ($before_box.fmt_errors().$text); } @@ -89,7 +97,6 @@ echo "



"; echo _("The security settings on your account do not permit you to access this function"); echo ""; - echo "

" . _("Back") . ""; echo "



"; //echo '