diff options
Diffstat (limited to 'phpBB/includes/acp')
| -rw-r--r-- | phpBB/includes/acp/acp_styles.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 16b1852cd6..ab9ddc0b6f 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -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) |
