mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Fix #19191: Change \Exception
to \Throwable
in BadRequestHttpException
and HttpException
This commit is contained in:
@ -9,6 +9,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #19148: Fix undefined array key errors in `yii\db\ActiveRelationTrait` (stevekr)
|
||||
- Bug #19041: Fix PHP 8.1 issues (longthanhtran, samdark, pamparam83, sartor, githubjeka)
|
||||
- Enh #19171: Added `$pagination` and `$sort` to `\yii\rest\IndexAction` for easy configuration (rhertogh)
|
||||
- Bug #19191: Change `\Exception` to `\Throwable` in `BadRequestHttpException` and `HttpException` (Dmitrijlin)
|
||||
|
||||
|
||||
2.0.44 December 30, 2021
|
||||
|
@ -25,9 +25,9 @@ class BadRequestHttpException extends HttpException
|
||||
* Constructor.
|
||||
* @param string $message error message
|
||||
* @param int $code error code
|
||||
* @param \Exception $previous The previous exception used for the exception chaining.
|
||||
* @param \Throwable|null $previous The previous exception used for the exception chaining.
|
||||
*/
|
||||
public function __construct($message = null, $code = 0, \Exception $previous = null)
|
||||
public function __construct($message = null, $code = 0, $previous = null)
|
||||
{
|
||||
parent::__construct(400, $message, $code, $previous);
|
||||
}
|
||||
|
@ -40,9 +40,9 @@ class HttpException extends UserException
|
||||
* @param int $status HTTP status code, such as 404, 500, etc.
|
||||
* @param string $message error message
|
||||
* @param int $code error code
|
||||
* @param \Exception $previous The previous exception used for the exception chaining.
|
||||
* @param \Throwable|null $previous The previous exception used for the exception chaining.
|
||||
*/
|
||||
public function __construct($status, $message = null, $code = 0, \Exception $previous = null)
|
||||
public function __construct($status, $message = null, $code = 0, $previous = null)
|
||||
{
|
||||
$this->statusCode = $status;
|
||||
parent::__construct((string)$message, $code, $previous);
|
||||
|
Reference in New Issue
Block a user