Skip to content

Fix required parameter after optional parameter deprecation warning. #22

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

Closed
wants to merge 1 commit into from
Closed

Fix required parameter after optional parameter deprecation warning. #22

wants to merge 1 commit into from

Conversation

bfoosness
Copy link

Fix #21 by defaulting the send method's $contentType to null and setting
it to the result of mime_content_type (or application/octet-stream on
failure) if a null content type is provided.

Fix #21 by defaulting the send method's $contentType to null and setting
it to the result of mime_content_type (or application/octet-stream on
failure) if a null content type is provided.
@mikehaertl
Copy link
Owner

@bfoosness Oops, I'm sorry, but I missed this PR before I did the same change in my other PR here: #23. As I see some problems here ($filename instead of $this->_filename, not supressing errors from mime_content_type() and missing update of docs) I hope you don't mind if I close this PR and we discuss the change in my other PR.

@mikehaertl mikehaertl closed this Nov 20, 2020
@bfoosness
Copy link
Author

Not a problem, your changes make sense to me. Thanks!

@bfoosness bfoosness deleted the null-content-type branch November 20, 2020 13:53
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.

PHP Deprecated: Required parameter $contentType follows optional parameter $filename
2 participants