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

Logger: Cast message to string before passing it to strtr #184

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

znerol
Copy link
Contributor

@znerol znerol commented Oct 14, 2024

Since the logger template is using strict types, it is necessary to explicitly cast the $message variable to a string before it is passed into strtr. Otherwise the following error is generated when a stringable gets logged:

TypeError: strtr(): Argument #1 ($string) must be of type string

See also php/php-src#12097 for more details.

@Chi-teck Chi-teck merged commit 27b41bb into Chi-teck:4.x Oct 15, 2024
0 of 2 checks passed
@Chi-teck
Copy link
Owner

Thank you.

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