From 8441d5d048d7acfe60a9f6c8e3a325738b8cfa48 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 14 Oct 2008 16:54:22 +0000 Subject: Removed an annoying variable cast that was destroying everything. git-svn-id: https://code.elgg.org/elgg/trunk@2259 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/social.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engine') diff --git a/engine/lib/social.php b/engine/lib/social.php index 036173dfc..ffa98444b 100644 --- a/engine/lib/social.php +++ b/engine/lib/social.php @@ -17,7 +17,7 @@ * @param string $string * @return array */ - function filter_string(string $string) { + function filter_string($string) { // Convert it to lower and trim $string = strtolower($string); @@ -38,7 +38,7 @@ $terms = explode(' ',$string); // Remove any blacklist terms - $terms = array_filter($terms, 'remove_blacklist'); + //$terms = array_filter($terms, 'remove_blacklist'); return $terms; @@ -54,6 +54,9 @@ global $CONFIG; + if (!is_array($CONFIG->wordblacklist)) + return $input; + if (strlen($input) < 3 || in_array($input,$CONFIG->wordblacklist)) return false; -- cgit v1.2.3