@sgiehl opened this Pull Request on January 20th 2022 Member


When generating the tables for PDF reports we are truncating the row values after a certain amount of chars (55). If a string contained a multibyte character (umlauts, emojis, ...) around this position, it happened, that the multibyte sequence was disrupted.

This did cause any bigger issues on PHP 7, where only parts of the string were displayed in the PDF
On PHP 8 this produced an error, causing an abort of the PDF generation.

Simply using mb_substr instead of substr fixes this issue for me.

If someone wants to reproduce:

  • Track any type of content (action, site search keyword, ...) with something like öööööööööööööööööööööööööööööööööööööööööööööööööööööööööööö
  • Create a PDF report that contains this content type
  • Click the download button to directly generate the report

@tsteur I've targeted next_release as it's really a minimal, low-risk change

fixes #18499


@sgiehl commented on January 26th 2022 Member

@tsteur feel free to merge this one if it should be included in 4.7. Otherwise I can also rebase to 4.x-dev instead.

This Pull Request was closed on January 26th 2022
Powered by GitHub Issue Mirror