1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 15:45:34 +02:00

fopen + fread + fclose -> file_get_contents

git-svn-id: file:///svn/phpbb/trunk@7230 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2007-03-25 15:58:48 +00:00
parent 6bc4b1412b
commit f5ddbc4653

View File

@ -163,13 +163,12 @@ class messenger
} }
} }
if (!($fd = @fopen($tpl_file, 'r'))) if (($data = @file_get_contents($tpl_file)) !== false)
{ {
trigger_error("Failed opening template file [ $tpl_file ]", E_USER_ERROR); trigger_error("Failed opening template file [ $tpl_file ]", E_USER_ERROR);
} }
$this->tpl_msg[$template_lang . $template_file] = fread($fd, filesize($tpl_file)); $this->tpl_msg[$template_lang . $template_file] = $data;
fclose($fd);
} }
$this->msg = $this->tpl_msg[$template_lang . $template_file]; $this->msg = $this->tpl_msg[$template_lang . $template_file];