summaryrefslogtreecommitdiff
path: root/actions/postnotice.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/postnotice.php')
-rw-r--r--actions/postnotice.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/actions/postnotice.php b/actions/postnotice.php
index 97e887c46..14152a83d 100644
--- a/actions/postnotice.php
+++ b/actions/postnotice.php
@@ -82,8 +82,9 @@ class PostnoticeAction extends Action
function checkNotice()
{
$content = common_shorten_links($_POST['omb_notice_content']);
- if (mb_strlen($content) > 140) {
- throw new Exception(_('The notice content is too long.'));
+ if (Notice::contentTooLong($content)) {
+ $this->clientError(_('Invalid notice content'), 400);
+ return false;
}
$license = $_POST['omb_notice_license'];
$site_license = common_config('license', 'url');