Skip to content

[Mime] Allow array as input for RawMessage #42976

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

Merged

Conversation

derrabus
Copy link
Member

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets N/A
License MIT
Doc PR N/A

RawMessage according to its documentation allows iterable|string as input. However, if I pass an array (which counts as an iterable), the instance would error when calling toString().

This PR fixes this problem.

An alternative solution would be to change the documentation to \Traversable|string.

@nicolas-grekas
Copy link
Member

For 4.4, isn't it?

@nicolas-grekas nicolas-grekas modified the milestones: 5.4, 4.4 Sep 10, 2021
Signed-off-by: Alexander M. Turek <me@derrabus.de>
@nicolas-grekas nicolas-grekas changed the base branch from 5.4 to 4.4 September 10, 2021 10:18
@nicolas-grekas nicolas-grekas force-pushed the bugfix/allow-array-in-raw-message branch from 7e2a1b8 to 10effd7 Compare September 10, 2021 10:18
@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas nicolas-grekas merged commit 3413afb into symfony:4.4 Sep 10, 2021
@derrabus derrabus deleted the bugfix/allow-array-in-raw-message branch September 10, 2021 10:20
This was referenced Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants