Browse Source

set UTF-8 for mb_substr

attempting to fix in php 5.5
pull/39/head
Aaron Parecki 4 years ago
parent
commit
ebea6869e1
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      lib/Formats/Twitter.php

+ 4
- 1
lib/Formats/Twitter.php View File

@ -41,7 +41,10 @@ class Twitter {
$refs = [];
// Only use the "display" segment of the text
$text = mb_substr($tweet->full_text, $tweet->display_text_range[0], $tweet->display_text_range[1]-$tweet->display_text_range[0]);
$text = mb_substr($tweet->full_text,
$tweet->display_text_range[0],
$tweet->display_text_range[1]-$tweet->display_text_range[0],
'UTF-8');
if(property_exists($tweet, 'retweeted_status')) {
// No content for retweets

Loading…
Cancel
Save