Krumo calls substr() which breaks UTF-8 data. The patch replaces it to drupal_substr().

CommentFileSizeAuthor
devel-krumo_substr.patch510 bytesmaximpodorov
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

Is unicode.inc always loaded when this code is called? Also, we're not really doing edits to krumo class. we need a replacement.

pcambra’s picture

Here's the main discussion for the krumo stuff #1853112: Replacement for Krumo?

maximpodorov’s picture

I understand that the real solution is getting rid of Krumo, but the current version of Devel just makes my site unusable for admins, since Krumo tries to cut large UTF-8 texts, and this produces such warnings:
Invalid UTF-8 sequence in argument in json_encode().

DamienMcKenna’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

If Drupal provides a replacement for a standard function, it should be used instead. IMHO it's worth using a quick bandaid, especially when there's no end in sight for the other issue. RTBC.

  • salvis committed 48def5e on 7.x-1.x
    Issue #2065225 by maximpodorov: Wrong usage of substr in krumo.
    
salvis’s picture

Status: Reviewed & tested by the community » Fixed

Beating a dead horse here, but I agree with DamienMcKenna.

Thanks, maximpodorov and DamienMcKenna!

Status: Fixed » Closed (fixed)

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