X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Ferror.class.php;h=cef939bdad5f3b0875d93753ab16387822c8d51d;hp=44b7b6dfb72da3661aae8dd1b6adb63dd4d099f7;hb=47ccfad452e8d345542d09e59112cac317cffed8;hpb=1455d7ecf10b340d84a04b189f2d90abf883ef30 diff --git a/class/error.class.php b/class/error.class.php index 44b7b6df..cef939bd 100644 --- a/class/error.class.php +++ b/class/error.class.php @@ -1,19 +1,26 @@ $sErrFile, - 'LINE' => $iErrLine) ;; + 'FILE' => $sErrFile, + 'LINE' => $iErrLine) ;; // what todo with $aContext? break; case E_USER_ERROR: @@ -93,29 +120,29 @@ class ErrorHandler { $aError = array_merge($aError,$aErrorTemp); // special error handling below if ($aError['category'] & SQM_ERROR_IMAP) { - $aErrorCategory[] = 'IMAP'; - // imap related error handling inside + $aErrorCategory[] = 'IMAP'; + // imap related error handling inside } if ($aError['category'] & SQM_ERROR_FS) { - $aErrorCategory[] = 'FILESYSTEM'; - // filesystem related error handling inside + $aErrorCategory[] = 'FILESYSTEM'; + // filesystem related error handling inside } if ($aError['category'] & SQM_ERROR_SMTP) { - $aErrorCategory[] = 'SMTP'; - // smtp related error handling inside + $aErrorCategory[] = 'SMTP'; + // smtp related error handling inside } if ($aError['category'] & SQM_ERROR_LDAP) { - $aErrorCategory[] = 'LDAP'; - // ldap related error handling inside + $aErrorCategory[] = 'LDAP'; + // ldap related error handling inside } if ($aError['category'] & SQM_ERROR_DB) { - $aErrorCategory[] = 'DATABASE'; - // db related error handling inside + $aErrorCategory[] = 'DATABASE'; + // db related error handling inside } if ($aError['category'] & SQM_ERROR_PLUGIN) { - $aErrorCategory[] = 'PLUGIN'; - do_hook_function('error_handler_plugin',$aError); - // plugin related error handling inside + $aErrorCategory[] = 'PLUGIN'; + do_hook_function('error_handler_plugin',$aError); + // plugin related error handling inside } //if ($aError['category'] & SQM_ERROR_X) { // $aErrorCategory[] = 'X'; @@ -129,17 +156,20 @@ class ErrorHandler { } break; default: break; + } + + $aErrorTpl = array( + 'type' => $iType, + 'category' => $aErrorCategory, + 'message' => $aError['message'], + 'link' => $aError['link'], + 'tip' => $aError['tip'], + 'extra' => $aError['extra']); + // Add the notice/warning/error to the existing list of notices/warnings + $this->aErrors[] = $aErrorTpl; + $this->Template->assign('aErrors',$this->aErrors); } - $aErrorTpl = array( - 'type' => $iType, - 'category' => $aErrorCategory, - 'message' => $aError['message'], - 'link' => $aError['link'], - 'tip' => $aError['tip'], - 'extra' => $aError['extra']); - // Add the notice/warning/error to the existing list of notices/warnings - $this->aErrors[] = $aErrorTpl; - $this->Template->assign('aErrors',$this->aErrors); + // Show the error immediate in case of fatal errors if ($iType == SQM_ERROR) { $this->DisplayErrors();