From 5d2e4e88ab3266b44101714a101d337e0053361e Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 21 Aug 2009 09:44:55 +0000 Subject: Allow "0" as censor word and replacement. Only obtain word censor list if text is not empty. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10039 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_content.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'phpBB/includes/functions_content.php') diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 7a30f0069e..c265d0ae41 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -685,6 +685,12 @@ function censor_text($text) { static $censors; + // Nothing to do? + if ($text === '') + { + return ''; + } + // We moved the word censor checks in here because we call this function quite often - and then only need to do the check once if (!isset($censors) || !is_array($censors)) { -- cgit v1.2.1