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

Address preg_match deprecation notice when sending null to second argument. #167

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

RTippin
Copy link
Contributor

@RTippin RTippin commented Mar 22, 2024

When using HandlerFactory::classFromRequest($request), this causes all handlers to check canBeUsedForRequest, thus newing up each handler. When we get to ContentRangeUploadHandler, the $contentRange would be null if we were not intending to use that handler for any case. Passing null as the subject to preg_match is deprecated.

Simple fix is to utilize the second argument for header and pass empty string as default.

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Tests pass? ✔️
Fixed issues #156

…Passing "null" to the second argument of preg_match is deprecated.
@pionl
Copy link
Owner

pionl commented Mar 25, 2024

All green, thank you!

Snímek obrazovky 2024-03-25 v 16 49 43

@pionl pionl merged commit cfbc429 into pionl:master Mar 25, 2024
6 checks passed
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.

2 participants