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

Prevent PHP Warning for Missing Request Parameter #239

Open
dilipbheda opened this issue Feb 15, 2025 · 0 comments · May be fixed by #240
Open

Prevent PHP Warning for Missing Request Parameter #239

dilipbheda opened this issue Feb 15, 2025 · 0 comments · May be fixed by #240

Comments

@dilipbheda
Copy link

Updated the code to avoid PHP warnings when the request parameter is missing. Now using the null coalescing operator (?? 0) to provide a default value, preventing undefined index errors. Also, removed the redundant empty check.

Ref: https://github.com/humanmade/smart-media/blob/master/inc/cropper/namespace.php#L560-L565

@dilipbheda dilipbheda linked a pull request Feb 15, 2025 that will close this issue
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 a pull request may close this issue.

1 participant