Ignore:
Timestamp:
Dec 6, 2021, 11:33:48 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Added: Explicit types for better type checking.
  • Fixed: Support for php 8.0.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Error.php

    r92 r95  
    33class ErrorHandler
    44{
    5   var $Encoding;
    6   var $ShowError;
    7   var $UserErrors;
    8   var $OnError;
     5  public string $Encoding;
     6  public bool $ShowError;
     7  public int $UserErrors;
     8  public $OnError;
    99
    1010  function __construct()
     
    6363  }
    6464
    65   function ExceptionHandler(Exception $Exception)
     65  function ExceptionHandler(Throwable $Exception)
    6666  {
    6767    $Backtrace = $Exception->getTrace();
     
    7575  }
    7676
    77   function ShowDefaultError($Message)
     77  function ShowDefaultError(string $Message): void
    7878  {
    7979    $Output = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>'."\n".
     
    8585      $Output .= '<pre>'.$Message.'</pre><br/>';
    8686    $Output .= '</body></html>';
    87     error_log($Message);
    8887    echo($Output);
    8988  }
Note: See TracChangeset for help on using the changeset viewer.