aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_messenger.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index dd84533b23..e68fbf58e6 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -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);
}
- $this->tpl_msg[$template_lang . $template_file] = fread($fd, filesize($tpl_file));
- fclose($fd);
+ $this->tpl_msg[$template_lang . $template_file] = $data;
}
$this->msg = $this->tpl_msg[$template_lang . $template_file];