Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix censoring functions. Thanks to Gargaj for helping.

  • Loading branch information...
commit 34db7a98c31840218960a88e3fc14f213a2a915c 1 parent 1427a3f
@dimkalinux dimkalinux authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 include/functions.php
View
13 include/functions.php
@@ -844,7 +844,7 @@ function sef_friendly($str)
// Replace censored words in $text loader
function censor_words($text)
{
- global $forum_db;
+ global $forum_db, $forum_censors;
$return = ($hook = get_hook('fn_censor_words_start')) ? eval($hook) : null;
if ($return != null)
@@ -876,10 +876,15 @@ function censor_words($text)
// Replace censored words in $text
function censor_words_do($forum_censors, $text, $unicode)
{
- static $search_for, $replace_with;
+ static $search_for = NULL;
+ static $replace_with = NULL;
+
+ if (is_null($search_for))
+ $search_for = array();
+
+ if (is_null($replace_with))
+ $replace_with = array();
- $search_for = array();
- $replace_with = array();
if (!empty($forum_censors))
{
Please sign in to comment.
Something went wrong with that request. Please try again.