-
-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update Serializer.php #553
Conversation
The long text was clipped incorrectly. An error "Malformed UTF-8 characters, possibly incorrectly encoded" occurs in the method encode in class Raven_Client, when trying to decode the cropped text. Sample text: ``` <p><strong class="h2">Борис Васильев. «Не стреляйте в белых лебедей»</strong><br></p> <p><br></p> <p> Человек и природа – вот основная тема произведения Бориса Васильева «Не стреляйте в белых лебедей».<br></p> <p><br></p> <p> Кто-то, как Егор Полушкин и его сынишка, стараются видеть вокруг красоту и помочь братьям нашим меньшим. А кто-то, как Федор Бурьянов и его сын Вова, смотрят на природу через прицел выгоды.<br></p> <p><br></p> <p> Вот из-за таких людей осталось от местного озера только название – «Лебяжье», а когда-то здесь действительно обитали лебеди. Егор Полушкин, поехав на рынок, покупает прекрасных белых лебедей для озера, чтобы возродить его красоту.<br></p> <p><br></p> <p> Но если для Егора лебеди - это красота, то для жителей деревни – только гастрономический изыск. <br></p> <p><br></p> <p> Беззаветно служа природе, Егор Полушкин отдает ей все, даже свою жизнь. Он не выдал своих обидчиков, наверное, в тайне надеясь на дальнейшее их исправление.<br></p> <p><br></p> <attach-media class="center" data-type="images" data-position="1"></attach-media> <p><br></p> ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change! Thanks!
Thanks for the contribution @truechudo ! Can you add a test to avoid regressing on this bug? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing tests
# Conflicts: # lib/Raven/Serializer.php
@truechudo I hope you won't mind I added the test for you 😄 It looks like Not sure why yet... since those function are around since PHP 4 and there is no documentation on any internal changes in the docs (http://php.net/manual/en/function.mb-substr.php). |
Okay fixed the tests but now it's failing on the memory thing again like in #588. |
That error should be solvable increasing the memory limit of that regression test... Let's hope we avoid the same failure under 5.3 afterwards! |
Damn, same failure... |
# Conflicts: # test/Raven/phpt/fatal_reported_with_async.phpt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now! 👍
* Fix gzipCompress function name PHP doesn't have `gzipCompress` function, use `gzcompress` instead http://php.net/manual/en/function.gzcompress.php (cherry picked from commit d391712) * Fix notice during tests * Fix Client PHPDoc tag (port of #548 to 2.x) * Added syntax highlighting to README.md (#551) (cherry picked from commit 4dd0a3e) * Add use statement for HttpException class (cherry picked from commit 389c3ac, port of #556 to 2.x) * Change badge with badge poser. (cherry picked from commit 47ce095, port of #557 to 2.x) * Update docs config (cherry picked from commit f9c90cf) * Add test to handle non default port in host (port of #572 to 2.x) * Update changelog with 1.8.4 info (port of #573 to 2.x) * Allow serialization 5 levels deep (port of #554 to 2.x) * Make Serializer string limit customizable (port of #559 to 2.x) * Avoid looping when exception throws exception (port of #587 to 2.x) * Fix monolog handler not accepting Throwable (port of #586 to 2.x) * Fix serializer to account for non-UTF-8 chars (port of #553 to 2.x) * Add 1.9.0 changelog entries (cherry picked from commit 01171cf) * Add timeout and excluded_options config docs (cherry picked from commit 6860a3e) * Add back unrelease heading to changelog (cherry picked from commit 3f52e6f) * Fix CS
The long text was clipped incorrectly. An error "Malformed UTF-8 characters, possibly incorrectly encoded" occurs in the method encode in class Raven_Client, when trying to decode the cropped text.
Sample text: