summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/editgroup.php6
-rw-r--r--actions/finishopenidlogin.php2
-rw-r--r--actions/newgroup.php6
-rw-r--r--actions/profilesettings.php6
-rw-r--r--actions/register.php6
-rw-r--r--actions/twitapiaccount.php2
-rw-r--r--actions/updateprofile.php8
-rw-r--r--actions/userauthorization.php8
8 files changed, 22 insertions, 22 deletions
diff --git a/actions/editgroup.php b/actions/editgroup.php
index 98ebcb87a..e7e79040a 100644
--- a/actions/editgroup.php
+++ b/actions/editgroup.php
@@ -191,13 +191,13 @@ class EditgroupAction extends Action
array('http', 'https')))) {
$this->showForm(_('Homepage is not a valid URL.'));
return;
- } else if (!is_null($fullname) && strlen($fullname) > 255) {
+ } else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
$this->showForm(_('Full name is too long (max 255 chars).'));
return;
- } else if (!is_null($description) && strlen($description) > 140) {
+ } else if (!is_null($description) && mb_strlen($description) > 140) {
$this->showForm(_('description is too long (max 140 chars).'));
return;
- } else if (!is_null($location) && strlen($location) > 255) {
+ } else if (!is_null($location) && mb_strlen($location) > 255) {
$this->showForm(_('Location is too long (max 255 chars).'));
return;
}
diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php
index bc9151120..1e7b73a7f 100644
--- a/actions/finishopenidlogin.php
+++ b/actions/finishopenidlogin.php
@@ -242,7 +242,7 @@ class FinishopenidloginAction extends Action
}
}
- if ($sreg['fullname'] && strlen($sreg['fullname']) <= 255) {
+ if ($sreg['fullname'] && mb_strlen($sreg['fullname']) <= 255) {
$fullname = $sreg['fullname'];
}
diff --git a/actions/newgroup.php b/actions/newgroup.php
index 42fd380df..cbd8dfeec 100644
--- a/actions/newgroup.php
+++ b/actions/newgroup.php
@@ -142,13 +142,13 @@ class NewgroupAction extends Action
array('http', 'https')))) {
$this->showForm(_('Homepage is not a valid URL.'));
return;
- } else if (!is_null($fullname) && strlen($fullname) > 255) {
+ } else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
$this->showForm(_('Full name is too long (max 255 chars).'));
return;
- } else if (!is_null($description) && strlen($description) > 140) {
+ } else if (!is_null($description) && mb_strlen($description) > 140) {
$this->showForm(_('description is too long (max 140 chars).'));
return;
- } else if (!is_null($location) && strlen($location) > 255) {
+ } else if (!is_null($location) && mb_strlen($location) > 255) {
$this->showForm(_('Location is too long (max 255 chars).'));
return;
}
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 82e6c3c82..60f7c0796 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -198,13 +198,13 @@ class ProfilesettingsAction extends AccountSettingsAction
!Validate::uri($homepage, array('allowed_schemes' => array('http', 'https')))) {
$this->showForm(_('Homepage is not a valid URL.'));
return;
- } else if (!is_null($fullname) && strlen($fullname) > 255) {
+ } else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
$this->showForm(_('Full name is too long (max 255 chars).'));
return;
- } else if (!is_null($bio) && strlen($bio) > 140) {
+ } else if (!is_null($bio) && mb_strlen($bio) > 140) {
$this->showForm(_('Bio is too long (max 140 chars).'));
return;
- } else if (!is_null($location) && strlen($location) > 255) {
+ } else if (!is_null($location) && mb_strlen($location) > 255) {
$this->showForm(_('Location is too long (max 255 chars).'));
return;
} else if (is_null($timezone) || !in_array($timezone, DateTimeZone::listIdentifiers())) {
diff --git a/actions/register.php b/actions/register.php
index 01d94f488..5d7a8ce69 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -167,13 +167,13 @@ class RegisterAction extends Action
array('http', 'https')))) {
$this->showForm(_('Homepage is not a valid URL.'));
return;
- } else if (!is_null($fullname) && strlen($fullname) > 255) {
+ } else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
$this->showForm(_('Full name is too long (max 255 chars).'));
return;
- } else if (!is_null($bio) && strlen($bio) > 140) {
+ } else if (!is_null($bio) && mb_strlen($bio) > 140) {
$this->showForm(_('Bio is too long (max 140 chars).'));
return;
- } else if (!is_null($location) && strlen($location) > 255) {
+ } else if (!is_null($location) && mb_strlen($location) > 255) {
$this->showForm(_('Location is too long (max 255 chars).'));
return;
} else if (strlen($password) < 6) {
diff --git a/actions/twitapiaccount.php b/actions/twitapiaccount.php
index dc8e2e798..b7c09cc9d 100644
--- a/actions/twitapiaccount.php
+++ b/actions/twitapiaccount.php
@@ -56,7 +56,7 @@ class TwitapiaccountAction extends TwitterapiAction
$location = trim($this->arg('location'));
- if (!is_null($location) && strlen($location) > 255) {
+ if (!is_null($location) && mb_strlen($location) > 255) {
// XXX: But Twitter just truncates and runs with it. -- Zach
$this->clientError(_('That\'s too long. Max notice size is 255 chars.'), 406, $apidate['content-type']);
diff --git a/actions/updateprofile.php b/actions/updateprofile.php
index c79112dac..898c53543 100644
--- a/actions/updateprofile.php
+++ b/actions/updateprofile.php
@@ -93,22 +93,22 @@ class UpdateprofileAction extends Action
}
# optional stuff
$fullname = $req->get_parameter('omb_listenee_fullname');
- if ($fullname && strlen($fullname) > 255) {
+ if ($fullname && mb_strlen($fullname) > 255) {
$this->clientError(_("Full name is too long (max 255 chars)."));
return false;
}
$homepage = $req->get_parameter('omb_listenee_homepage');
- if ($homepage && (!common_valid_http_url($homepage) || strlen($homepage) > 255)) {
+ if ($homepage && (!common_valid_http_url($homepage) || mb_strlen($homepage) > 255)) {
$this->clientError(sprintf(_("Invalid homepage '%s'"), $homepage));
return false;
}
$bio = $req->get_parameter('omb_listenee_bio');
- if ($bio && strlen($bio) > 140) {
+ if ($bio && mb_strlen($bio) > 140) {
$this->clientError(_("Bio is too long (max 140 chars)."));
return false;
}
$location = $req->get_parameter('omb_listenee_location');
- if ($location && strlen($location) > 255) {
+ if ($location && mb_strlen($location) > 255) {
$this->clientError(_("Location is too long (max 255 chars)."));
return false;
}
diff --git a/actions/userauthorization.php b/actions/userauthorization.php
index 58fc96c0e..7455a41a6 100644
--- a/actions/userauthorization.php
+++ b/actions/userauthorization.php
@@ -469,19 +469,19 @@ class UserauthorizationAction extends Action
}
# optional stuff
$fullname = $req->get_parameter('omb_listenee_fullname');
- if ($fullname && strlen($fullname) > 255) {
+ if ($fullname && mb_strlen($fullname) > 255) {
throw new OAuthException("Full name '$fullname' too long.");
}
$homepage = $req->get_parameter('omb_listenee_homepage');
- if ($homepage && (!common_valid_http_url($homepage) || strlen($homepage) > 255)) {
+ if ($homepage && (!common_valid_http_url($homepage) || mb_strlen($homepage) > 255)) {
throw new OAuthException("Invalid homepage '$homepage'");
}
$bio = $req->get_parameter('omb_listenee_bio');
- if ($bio && strlen($bio) > 140) {
+ if ($bio && mb_strlen($bio) > 140) {
throw new OAuthException("Bio too long '$bio'");
}
$location = $req->get_parameter('omb_listenee_location');
- if ($location && strlen($location) > 255) {
+ if ($location && mb_strlen($location) > 255) {
throw new OAuthException("Location too long '$location'");
}
$avatar = $req->get_parameter('omb_listenee_avatar');