Skip to content

Commit b5057bb

Browse files
authored
fix: allow null for previous in exception
1 parent 6d4cf25 commit b5057bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Exception extends \RuntimeException
2525
* @param int $code The Exception code
2626
* @param \Exception $previous The previous exception used for the exception chaining.
2727
*/
28-
public function __construct($message = "", $code = 0, \Exception $previous = null)
28+
public function __construct($message = "", $code = 0, ?\Exception $previous = null)
2929
{
3030
if (!$code) {
3131
$code = self::E_ANY;

0 commit comments

Comments
 (0)