mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
NOBUG: BOM rebombed from 19_STABLE
This commit is contained in:
parent
7b55e20a2a
commit
1a6b93675b
@ -108,9 +108,12 @@ if ($um->preprocess_files() && confirm_sesskey()) {
|
||||
@apache_child_terminate();
|
||||
}
|
||||
|
||||
//Fix mac/dos newlines
|
||||
// Fix mac/dos newlines
|
||||
// TODO: Switch to cvslib when possible
|
||||
$textlib = textlib_get_instance();
|
||||
$text = my_file_get_contents($filename);
|
||||
$text = preg_replace('!\r\n?!',"\n",$text);
|
||||
$text = $textlib->trim_utf8_bom($text); // remove Unicode BOM from first line
|
||||
$fp = fopen($filename, "w");
|
||||
fwrite($fp, $text);
|
||||
fclose($fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user