forked from GNUsocial/gnu-social
Avoid notice in DirectionDetectorPlugin when dealing with empty string.
This commit is contained in:
parent
e04a6ef93e
commit
d67a9b437c
@ -81,6 +81,9 @@ class DirectionDetectorPlugin extends Plugin {
|
||||
* @return boolean
|
||||
*/
|
||||
public static function startsWithRTLCharacter($str){
|
||||
if (strlen($str) < 1) {
|
||||
return false;
|
||||
}
|
||||
if( is_array($cc = self::utf8ToUnicode(mb_substr($str, 0, 1, 'utf-8'))) )
|
||||
$cc = $cc[0];
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user