mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 01:42:14 +09:00
Improve whitespace handling when sending split messages
This commit is contained in:
parent
21317a3dc0
commit
4bafdd77a5
1 changed files with 2 additions and 2 deletions
|
|
@ -548,7 +548,7 @@ class SMS
|
|||
*/
|
||||
public function splitMessage($message, $maxlength, $measure_in_charset = 'CP949')
|
||||
{
|
||||
$message = utf8_trim(utf8_normalize_spaces($message));
|
||||
$message = utf8_trim(utf8_normalize_spaces($message, true));
|
||||
$chars = preg_split('//u', $message, -1, PREG_SPLIT_NO_EMPTY);
|
||||
$result = array();
|
||||
$current_entry = '';
|
||||
|
|
@ -572,7 +572,7 @@ class SMS
|
|||
|
||||
if ($current_entry !== '')
|
||||
{
|
||||
$result[] = $current_entry;
|
||||
$result[] = trim($current_entry);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue