Browse files

Merge branch 'MDL-26277-21' of https://github.com/mackensen/moodle in…

…to MOODLE_21_STABLE
  • Loading branch information...
2 parents 97f8f66 + e8a2fa8 commit bc1f0e0b405ffc75a96a67b11e429a41c1d34ead Sam Hemelryk committed Jun 6, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 grade/import/csv/index.php
View
4 grade/import/csv/index.php
@@ -126,7 +126,9 @@
fwrite($fp,$text);
fclose($fp);
- $fp = fopen($filename, "r");
+ if (!$fp = fopen($filename, "r")) {
+ print_error('cannotopenfile');
+ }
// --- get header (field names) ---
$header = explode($csv_delimiter, fgets($fp, GRADE_CSV_LINE_LENGTH));

0 comments on commit bc1f0e0

Please sign in to comment.