浏览代码

Merge pull request #3112 from pixelfed/staging

Staging
daniel 3 年之前
父节点
当前提交
4e27fee344
共有 2 个文件被更改,包括 13 次插入1 次删除
  1. 12 0
      app/Exceptions/Handler.php
  2. 1 1
      app/Http/Controllers/StatusController.php

+ 12 - 0
app/Exceptions/Handler.php

@@ -41,6 +41,18 @@ class Handler extends ExceptionHandler
 		parent::report($exception);
 	}
 
+	/**
+	* Register the exception handling callbacks for the application.
+	*
+	* @return void
+	*/
+	public function register()
+	{
+		$this->reportable(function (\BadMethodCallException $e) {
+			return app()->environment() !== 'production';
+		});
+	}
+
 	/**
 	 * Render an exception into an HTTP response.
 	 *

+ 1 - 1
app/Http/Controllers/StatusController.php

@@ -28,7 +28,7 @@ use App\Util\Media\License;
 
 class StatusController extends Controller
 {
-	public function show(Request $request, $username, int $id)
+	public function show(Request $request, $username, $id)
 	{
 		$user = Profile::whereNull('domain')->whereUsername($username)->firstOrFail();