mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-33780' of git://github.com/timhunt/moodle
This commit is contained in:
commit
b8b82c051d
@ -539,7 +539,10 @@ class qformat_default {
|
||||
if (is_readable($filename)) {
|
||||
$filearray = file($filename);
|
||||
|
||||
/// Check for Macintosh OS line returns (ie file on one line), and fix
|
||||
// If the first line of the file starts with a UTF-8 BOM, remove it.
|
||||
$filearray[0] = textlib::trim_utf8_bom($filearray[0]);
|
||||
|
||||
// Check for Macintosh OS line returns (ie file on one line), and fix.
|
||||
if (preg_match("~\r~", $filearray[0]) AND !preg_match("~\n~", $filearray[0])) {
|
||||
return explode("\r", $filearray[0]);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user