summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-18 12:23:01 -0700
committerBrion Vibber <brion@pobox.com>2010-10-18 12:23:01 -0700
commitd67a9b437c3545b3a435953dbb529b64934cc767 (patch)
tree51baeab11c1fd5779b978782f264618c9bd50984 /plugins
parente04a6ef93ef7706671ba14f5108690bfe12c1592 (diff)
Avoid notice in DirectionDetectorPlugin when dealing with empty string.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/DirectionDetector/DirectionDetectorPlugin.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php
index 1473c386f..4a38f390f 100644
--- a/plugins/DirectionDetector/DirectionDetectorPlugin.php
+++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php
@@ -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