Przeglądaj źródła

修改发送消息提醒环境限制

kevin_zhangl 3 lat temu
rodzic
commit
545ddb1bb1
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      vendor/yiisoft/yii2/web/ErrorHandler.php

+ 6 - 0
vendor/yiisoft/yii2/web/ErrorHandler.php

@@ -190,6 +190,12 @@ class ErrorHandler extends \yii\base\ErrorHandler
                     'message' => 'Bad request! Please contact the customer service personnel.',
                     'message' => 'Bad request! Please contact the customer service personnel.',
                     'code' => $exception->getCode(),
                     'code' => $exception->getCode(),
                 ];
                 ];
+                if ($exception instanceof HttpException) {
+                    $array['status'] = $exception->statusCode;
+                }
+                if (YII_DEBUG) {
+                    $array['type'] = get_class($exception);
+                }
 
 
                 return $array;
                 return $array;
             }
             }