MDL-15469 adding fclose before write to already open file; merged from MOODLE_19_STABLE

This commit is contained in:
skodak
2008-07-09 10:33:50 +00:00
parent 73ef9f11ba
commit 33df4820bf
+1
View File
@@ -159,6 +159,7 @@ global $HTTPSPAGEREQUIRED;
if (file_exists($CFG->dataroot.'/emailcount')){
$fp = fopen($CFG->dataroot.'/emailcount', 'r');
$content = fread($fp, 24);
fclose($fp);
if((time() - (int)$content) > 600){
mail($CFG->emailconnectionerrorsto,
'WARNING: Database connection error: '.$CFG->wwwroot,