X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Ferrors.inc;h=2a1aedd9f9138afdd4ab5bd79c37fa67fbe1191a;hb=c1d9948011a5de68a4d8d599fc548c010670dd5e;hp=937270eac3f4c5149371710f5f8ba9cdd48b8458;hpb=8ffddf50ffbe93672c769e2cf0501d0f9125e2a0;p=fa-stable.git
diff --git a/includes/errors.inc b/includes/errors.inc
index 937270ea..2a1aedd9 100644
--- a/includes/errors.inc
+++ b/includes/errors.inc
@@ -93,46 +93,45 @@ function error_handler($errno, $errstr, $file, $line) {
function fmt_errors($center=false) {
global $messages, $path_to_root, $SysPrefs;
- $msg_class = array(
- E_USER_ERROR => 'err_msg',
- E_USER_WARNING =>'warn_msg',
- E_USER_NOTICE => 'note_msg');
-
- $type = E_USER_NOTICE;
- $content = '';
-// $class = 'no_msg';
- if (count($messages)) {
- foreach($messages as $cnt=>$msg) {
- if ($SysPrefs->go_debug && $msg[0]>E_USER_NOTICE)
- $msg[0] = E_ERROR;
-
- if ($msg[0]>$type) continue;
-
- if ($msg[0]<$type) {
- if ($msg[0] == E_USER_WARNING) {
- $type = E_USER_WARNING; // user warnings
- $content = ''; // clean notices when we have errors
- } else {
- $type = E_USER_ERROR; // php or user errors
- if($type == E_USER_WARNING)
- $content = ''; // clean other messages
+ $msg_class = array(
+ E_USER_ERROR => 'err_msg',
+ E_USER_WARNING =>'warn_msg',
+ E_USER_NOTICE => 'note_msg');
+
+ $type = E_USER_NOTICE;
+ $content = '';
+
+ if (count($messages)) {
+ foreach($messages as $cnt=>$msg) {
+ if ($SysPrefs->go_debug && $msg[0]>E_USER_NOTICE)
+ $msg[0] = E_ERROR;
+
+ if ($msg[0]>$type) continue;
+
+ if ($msg[0]<$type) {
+ if ($msg[0] == E_USER_WARNING) {
+ $type = E_USER_WARNING; // user warnings
+ $content = ''; // clean notices when we have errors
+ } else {
+ $type = E_USER_ERROR; // php or user errors
+ if($type == E_USER_WARNING)
+ $content = ''; // clean other messages
+ }
}
- }
- $str = $msg[1];
- if (!in_array($msg[0], array(E_USER_NOTICE, E_USER_ERROR, E_USER_WARNING)) && $msg[2] != null)
- $str .= ' '._('in file').': '.$msg[2].' '._('at line ').$msg[3];
+ $str = $msg[1];
+ if (!in_array($msg[0], array(E_USER_NOTICE, E_USER_ERROR, E_USER_WARNING)) && $msg[2] != null)
+ $str .= ' '._('in file').': '.$msg[2].' '._('at line ').$msg[3];
- if ($SysPrefs->go_debug>1 && $type!=E_USER_NOTICE && $type!=E_USER_WARNING)
- $str .= '
'.$msg[4];
- $content .= ($cnt ? '