diff --git a/engine/function/general.php b/engine/function/general.php index 6cd5108..60db4c1 100644 --- a/engine/function/general.php +++ b/engine/function/general.php @@ -1,4 +1,5 @@ config('maxW')) { - return false; - } else { - return $string; - } + return (str_word_count(trim($string)) > config('maxW')) ? false : trim($string); } // Checks if an IPv4(or localhost IPv6) address is valid