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

Required parameter $params follows optional parameter $method #127

Open
tonybyng opened this issue Jun 22, 2021 · 0 comments
Open

Required parameter $params follows optional parameter $method #127

tonybyng opened this issue Jun 22, 2021 · 0 comments

Comments

@tonybyng
Copy link
Contributor

Hi

Im getting the error

Required parameter $params follows optional parameter $method

in a PHP 8 system

Its triggered from

protected function prepareParameters($method = null, $url = null,

and you can no longer have required parameters appearing after optional parameters in PHP 8

I think adding a " = [] " after the array $params would solve the problem without requiring a change of parameter order and maybe an empty() check in the body of the method to ensure it is required ?

Tony

@tonybyng tonybyng mentioned this issue Jun 23, 2021
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

No branches or pull requests

1 participant