Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Deprecation in PHP 8.1 when RestException without message is created #685

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

radiat-r
Copy link

@radiat-r radiat-r commented Sep 1, 2022

Starting with PHP 8.1 passing null to internal methods that only accept string is deprecated.

The $message Parameter of RestException::__construct has null as default value, which in turn is passed to parent::__construct.

Calling new RestException(500) will produce the following message:
Exception::__construct(): Passing null to parameter #1 ($message) of type string is deprecated

See also https://3v4l.org/CNRAR

…eated

Exception::__construct(): Passing null to parameter Luracast#1 ($message) of type string is deprecated

See also https://3v4l.org/CNRAR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant