X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fsession.inc;h=3f4d7cd4e219138101f1d1ca2f2c64a2563eac4e;hb=74dc7287df122a02d0e5ef3b8bda58e60057a5a1;hp=bad4ef65aa9bbfe2fa24085e012d37ab3ab1d31e;hpb=9a2baf28c28edc0745f70f758ed9a1335dd87f07;p=fa-stable.git diff --git a/includes/session.inc b/includes/session.inc index bad4ef65..3f4d7cd4 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -1,17 +1,24 @@ . +***********************************************************************/ function output_html($text) { - global $before_box, $Ajax; + 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); } @@ -90,7 +97,6 @@ echo "



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

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



"; //echo '