Notice URIs are not necessarily URLs.
Let's use getUrl() for URL retrieval. May throw exceptions, but only if it's a Notice that cannot be linked like that anyway.
This commit is contained in:
@@ -628,7 +628,7 @@ class Facebookclient
|
||||
|
||||
// Facebook has a 420-char hardcoded max.
|
||||
if (mb_strlen($statustxt) > 420) {
|
||||
$noticeUrl = common_shorten_url($this->notice->uri);
|
||||
$noticeUrl = common_shorten_url($this->notice->getUrl());
|
||||
$urlLen = mb_strlen($noticeUrl);
|
||||
$txt = mb_substr($statustxt, 0, 420 - ($urlLen + 3)) . ' … ' . $noticeUrl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user