From 5e542ce897a19e93584f8f510f9456ef55b91e50 Mon Sep 17 00:00:00 2001 From: JanHuang Date: Wed, 3 May 2017 14:29:58 +0800 Subject: [PATCH] fixed abort params --- helpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers.php b/helpers.php index 4820c3b3..f84fd736 100644 --- a/helpers.php +++ b/helpers.php @@ -78,12 +78,12 @@ function json(array $content = [], $statusCode = Response::HTTP_OK) } /** - * @param $message * @param $statusCode + * @param $message * * @throws Exception */ -function abort($message, $statusCode) +function abort($statusCode, $message = null) { throw new Exception((is_null($message) ? Response::$statusTexts[$statusCode] : $message), $statusCode); }