]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/newnotice.php
better error reporting in user authorization action
[quix0rs-gnu-social.git] / actions / newnotice.php
index 8de6643a0f29b5f437c0d49f4873cf8f449a4991..cc40f89bc137a519843858e7fdc20f659447d0b0 100644 (file)
@@ -43,7 +43,9 @@ class NewnoticeAction extends Action {
                if (!$content) {
                        $this->show_form(_('No content!'));
                        return;
-               } else if (strlen($content) > 140) {
+               } else if (mb_strlen($content) > 140) {
+                       common_debug("Content = '$content'", __FILE__);
+                       common_debug("mb_strlen(\$content) = " . mb_strlen($content), __FILE__);
                        $this->show_form(_('That\'s too long. Max notice size is 140 chars.'));
                        return;
                }
@@ -64,7 +66,7 @@ class NewnoticeAction extends Action {
                                                                        array('nickname' => $user->nickname));
                } else {
                        $url = common_local_url('shownotice',
-                                                                       array('notice' => $id));
+                                                                       array('notice' => $notice->id));
                }
                common_redirect($url, 303);
        }