Пример #1
0
function peach_error_handler($errno, $errstr, $errfile, $errline)
{
    $msg = "{$errno} : {$errstr} in {$errline} of {$errfile}";
    Error::log($msg);
    ExceptionHandler::show_error('an error occurred');
    return true;
}
 /**
  * @covers System\handler\ExceptionHandler::show_error
  */
 public function test_show_error()
 {
     ob_start();
     ExceptionHandler::show_error('an error occurred');
     ob_end_clean();
     self::assertNull(error_get_last());
 }
Пример #3
0
 public function initialize()
 {
     mb_internal_encoding('UTF-8');
     mb_http_output('UTF-8');
     mb_http_input('UTF-8');
     \common\classes\Error::initialize();
     \System\handler\ExceptionHandler::initialize();
     /**
      * @var $session Session
      */
     $session = \common\classes\Application::get_class(Session::class);
     $session->start();
 }