Explorar o código

Adding filp/whoops (#36)

Sergei Solovev %!s(int64=2) %!d(string=hai) anos
pai
achega
c6c3ce0627
Modificáronse 3 ficheiros con 11 adicións e 2 borrados
  1. 2 1
      composer.json
  2. 4 0
      system/acp/distributor.php
  3. 5 1
      system/distributor.php

+ 2 - 1
composer.json

@@ -1,6 +1,7 @@
 {
 {
   "require": {
   "require": {
     "symfony/polyfill": "*",
     "symfony/polyfill": "*",
-    "delight-im/cookie": "^3.4"
+    "delight-im/cookie": "^3.4",
+    "filp/whoops": "2.15.1"
   }
   }
 }
 }

+ 4 - 0
system/acp/distributor.php

@@ -3,6 +3,10 @@
         exit(header('Refresh: 0; URL=http://'.$_SERVER['SERVER_NAME'].'/404'));
         exit(header('Refresh: 0; URL=http://'.$_SERVER['SERVER_NAME'].'/404'));
 
 
     $device = '!mobile';
     $device = '!mobile';
+    // Подключение filp/whoops
+    $whoops = new \Whoops\Run;
+    $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
+    $whoops->register();
 
 
     // Парсинг адреса
     // Парсинг адреса
     $url = is_array(sys::url()) ? sys::url() : array();
     $url = is_array(sys::url()) ? sys::url() : array();

+ 5 - 1
system/distributor.php

@@ -4,7 +4,11 @@
         exit(header('Refresh: 0; URL=http://'.$_SERVER['SERVER_NAME'].'/404'));
         exit(header('Refresh: 0; URL=http://'.$_SERVER['SERVER_NAME'].'/404'));
 
 
     $device = '!mobile';
     $device = '!mobile';
-    
+    // Подключение filp/whoops
+    $whoops = new \Whoops\Run;
+    $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
+    $whoops->register();
+
     // Парсинг адреса
     // Парсинг адреса
     $url = is_array(sys::url()) ? sys::url() : array();
     $url = is_array(sys::url()) ? sys::url() : array();
     $route = sys::url(false);
     $route = sys::url(false);