diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-03-16 14:35:14 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-03-16 14:35:14 +0000 |
commit | 21aeaab002118fd76abf6b352122dfb7cd55f06a (patch) | |
tree | 81099c60aeff14b59b4c1ac65abbaebbad6c1901 /phpBB/includes/message_parser.php | |
parent | 549fefecb2c8a1357a1b7da46dac5eba3a6ff544 (diff) | |
download | forums-21aeaab002118fd76abf6b352122dfb7cd55f06a.tar forums-21aeaab002118fd76abf6b352122dfb7cd55f06a.tar.gz forums-21aeaab002118fd76abf6b352122dfb7cd55f06a.tar.bz2 forums-21aeaab002118fd76abf6b352122dfb7cd55f06a.tar.xz forums-21aeaab002118fd76abf6b352122dfb7cd55f06a.zip |
fix bug #42785
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9370 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index bbe7cb5fa8..ed09cfa6bd 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1105,13 +1105,6 @@ class parse_message extends bbcode_firstpass } } - // Check for "empty" message - if ($mode !== 'sig' && utf8_clean_string($this->message) === '') - { - $this->warn_msg[] = $user->lang['TOO_FEW_CHARS']; - return (!$update_this_message) ? $return_message : $this->warn_msg; - } - // Prepare BBcode (just prepares some tags for better parsing) if ($allow_bbcode && strpos($this->message, '[') !== false) { @@ -1154,6 +1147,14 @@ class parse_message extends bbcode_firstpass } } + // Check for "empty" message. We do not check here for maximum length, because bbcode, smilies, etc. can add to the length. + // The maximum length check happened before any parsings. + if ($mode !== 'sig' && utf8_clean_string($this->message) === '') + { + $this->warn_msg[] = $user->lang['TOO_FEW_CHARS']; + return (!$update_this_message) ? $return_message : $this->warn_msg; + } + // Check number of links if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls']) { |