\Drupal\search_api_db\Plugin\search_api\backend\Database uses mb_strcut() to get a substring by byte length. Multibyte string extension is not guaranteed to be available. There is a Drupal\Component\Utility\Unicode::truncateBytes()

Comments

ekes’s picture

Issue summary: View changes
ekes’s picture

Issue tags: +Novice
p-neyens’s picture

Assigned: Unassigned » p-neyens
p-neyens’s picture

Status: Active » Needs review
StatusFileSize
new3.41 KB

Replace all mb_strcut() with Drupal\Component\Utility\Unicode::truncateBytes().

drunken monkey’s picture

Status: Needs review » Fixed

Looks good, thanks a lot!
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.