use mb_substr for xmpp daemon check

darcs-hash:20080818025549-84dde-0277e3c0b58a6d223f892376cfc9f5aa9df9714b.gz
This commit is contained in:
Evan Prodromou 2008-08-17 22:55:49 -04:00
parent ee858bc880
commit c9d9ecffd4

View File

@ -234,7 +234,7 @@ class XMPPDaemon {
} }
function add_notice(&$user, &$pl) { function add_notice(&$user, &$pl) {
$notice = Notice::saveNew($user->id, trim(substr($pl['body'], 0, 140)), 'xmpp'); $notice = Notice::saveNew($user->id, trim(mb_substr($pl['body'], 0, 140)), 'xmpp');
if (is_string($notice)) { if (is_string($notice)) {
$this->log(LOG_ERR, $notice); $this->log(LOG_ERR, $notice);
return; return;