Issue #2361843 by rpayanm: Remove usage of drupal_substr().