when cleaning strings, actually return them after that or it's senseless

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-05-15 08:20:52 +02:00
parent f82fe620dd
commit 9c500f290e

View File

@@ -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 . ")");
}
}