From 9c500f290e8737e193ea3b0b765f5da4aa0a097a Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Thu, 15 May 2014 08:20:52 +0200 Subject: [PATCH] when cleaning strings, actually return them after that or it's senseless Signed-off-by: Michael Kaufmann (d00p) --- lib/functions/validate/function.validate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/validate/function.validate.php b/lib/functions/validate/function.validate.php index cc63ec02..eddb8c3c 100644 --- a/lib/functions/validate/function.validate.php +++ b/lib/functions/validate/function.validate.php @@ -61,7 +61,7 @@ function validate($str, $fieldname, $pattern = '', $lng = '', $emptydefault = ar // Allows letters a-z, digits, space (\\040), hyphen (\\-), underscore (\\_) and backslash (\\\\), // everything else is removed from the string. $allowed = "/[^a-z0-9\\040\\.\\-\\_\\\\]/i"; - preg_replace($allowed, "", $str); + $str = preg_replace($allowed, "", $str); $log->logAction(USR_ACTION, LOG_WARNING, "cleaned bad formatted string (" . $str . ")"); } }