Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'MDL-33780_22' of git://github.com/timhunt/moodle into M…

…OODLE_22_STABLE
  • Loading branch information...
commit 4769b04283bf2fd96a247dea0666cceefcf1ba06 2 parents 1693774 + f4bd9d3
Dan Poltawski danpoltawski authored

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +4 1 question/format.php
5 question/format.php
@@ -539,7 +539,10 @@ protected function readdata($filename) {
539 539 if (is_readable($filename)) {
540 540 $filearray = file($filename);
541 541
542   - /// Check for Macintosh OS line returns (ie file on one line), and fix
  542 + // If the first line of the file starts with a UTF-8 BOM, remove it.
  543 + $filearray[0] = textlib::trim_utf8_bom($filearray[0]);
  544 +
  545 + // Check for Macintosh OS line returns (ie file on one line), and fix.
543 546 if (preg_match("~\r~", $filearray[0]) AND !preg_match("~\n~", $filearray[0])) {
544 547 return explode("\r", $filearray[0]);
545 548 } else {

0 comments on commit 4769b04

Please sign in to comment.
Something went wrong with that request. Please try again.