Stable branch merged up to 2.3.21
[fa-stable.git] / includes / main.inc
index 1101584eca779028dd8b6f1bec7547fddad91b7b..8ef038ca1f06e63e39959c250889781cebee05f1 100644 (file)
@@ -353,6 +353,7 @@ function find_custom_file($rep)
        Changes all not POSIX compatible chars to underscore.
 */
 function clean_file_name($filename) {
+    $filename = str_replace(chr(0), '', $filename);
     return preg_replace('/[^a-zA-Z0-9.\-_]/', '_', $filename);
 }