MDL-15469 adding fclose before write to already open file

This commit is contained in:
skodak
2008-07-09 10:32:37 +00:00
parent 8cfc7e4ed4
commit e690e668ba
+1
View File
@@ -161,6 +161,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,