mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-17 15:11:40 +02:00
Fix bug #47345 - Check if template file is empty before trying to read from it.
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9682 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -137,6 +137,7 @@
|
||||
<li>[Fix] Add poster-name to moderator-log when deleting post/topic (Bug #46225 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] "Report details" link broken in MCP (Bug #46975 - Patch by nickvergessen)</li>
|
||||
<li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685 - Patch by bantu)</li>
|
||||
<li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345 - Patch by bantu)</li>
|
||||
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
|
||||
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
|
||||
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
|
||||
|
@@ -2556,9 +2556,22 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
{
|
||||
trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
|
||||
}
|
||||
$template_data = fread($fp, filesize("{$phpbb_root_path}styles/$template_path$pathfile$file"));
|
||||
|
||||
$filesize = filesize("{$phpbb_root_path}styles/$template_path$pathfile$file");
|
||||
|
||||
if ($filesize)
|
||||
{
|
||||
$template_data = fread($fp, $filesize);
|
||||
}
|
||||
|
||||
fclose($fp);
|
||||
|
||||
if (!$filesize)
|
||||
{
|
||||
// File is empty
|
||||
continue;
|
||||
}
|
||||
|
||||
if (preg_match_all('#<!-- INCLUDE (.*?\.html) -->#is', $template_data, $matches))
|
||||
{
|
||||
foreach ($matches[1] as $match)
|
||||
|
Reference in New Issue
Block a user