浏览代码

Adding filp/whoops (#36)

Sergei Solovev 2 年之前
父节点
当前提交
c6c3ce0627
共有 3 个文件被更改,包括 11 次插入2 次删除
  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": {
     "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'));
 
     $device = '!mobile';
+    // Подключение filp/whoops
+    $whoops = new \Whoops\Run;
+    $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
+    $whoops->register();
 
     // Парсинг адреса
     $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'));
 
     $device = '!mobile';
-    
+    // Подключение filp/whoops
+    $whoops = new \Whoops\Run;
+    $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
+    $whoops->register();
+
     // Парсинг адреса
     $url = is_array(sys::url()) ? sys::url() : array();
     $route = sys::url(false);