Skip to content

Commit

Permalink
Always convert null to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Aug 26, 2019
1 parent 5897c94 commit 25a847c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Access/AuthorizationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ class AuthorizationException extends Exception
* @param \Exception|null $previous
* @return void
*/
public function __construct($message = null, $code = 0, Exception $previous = null)
public function __construct($message = null, $code = null, Exception $previous = null)
{
parent::__construct($message ?? 'This action is unauthorized.', 0, $previous);

$this->code = $code;
$this->code = $code ?: 0;
}

/**
Expand Down

0 comments on commit 25a847c

Please sign in to comment.