-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
[9.x] Fix Queue Failed_jobs insert issue with Exception contain UNICODE #41020
Conversation
As I said in #41016, I don't think there's a bug here. This PR will also be breaking for anyone using queues. |
In this case this error thorwing by a failed job (Swift_TransportException). Not a manual throwing. |
@boomhq can you link to the code that causes this? |
Can we use |
@driesvints imagine an error response from an external API (that is included in a Guzzle exception message) that is not in an encoding your database can store. That is the bug. |
For easy reproduce juste create a job with public function handle()
{
throw (new \Exception(utf8_decode ('ÐÑÙ0E\xE2\x�98\xA0World��7B¹!þÿ')));
}
Yes I would like your opinion on whether I should continue on this path. |
The
Speaking of which: tests would be nice before merging :) |
I'm currently trying to write the tests. Sorry, I don't want to waste your time. I just hesitate because I want to do it right. |
89aad5c
to
d9d9f05
Compare
Test added |
Can't Insert failed job exception with UNICODE character.
Add an "utf8_encode" front of exception.
If you have a better way, my ears is open
I deal manually with this case from laravel 5.5
Issues :
#24263
#41016