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:35:25 +00:00
parent 906ebc4b66
commit 54a606e91c

View File

@ -80,6 +80,7 @@ function setup_DB() {
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,