diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index b6ddd59e96..312ef8369e 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -91,6 +91,7 @@
[Fix] Posts incremented for multiple approval of the same topic (Bug #40495 - Patch by TerraFrost)
[Fix] Missing end " in quote bb tag deletes text (Bug #40565 - Patch by TerraFrost)
[Fix] Friend/foe system displays posts made by foes while composing (Bug #40325 - Patch by TerraFrost and Highway of Life)
+ [Fix] Check forum_image whether it exists (Bug #39005 - Patch by TerraFrost)
[Fix] Added missing read permission information for some phpbb_chmod() calls
[Fix] Correctly display future dates (Bug #38755)
[Fix] Fix guest/bot session problems with apache authentication plugin (Bug #41085)
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 6095fdd48b..f6c879ee93 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -888,7 +888,7 @@ class acp_forums
*/
function update_forum_data(&$forum_data)
{
- global $db, $user, $cache;
+ global $db, $user, $cache, $phpbb_root_path;
$errors = array();
@@ -926,6 +926,11 @@ class acp_forums
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data['forum_topics_per_page'], 'column_type' => 'TINT:0'),
);
+ if (!file_exists($phpbb_root_path . $forum_data['forum_image']))
+ {
+ $errors[] = $user->lang['FORUM_IMAGE_NO_EXIST'];
+ }
+
validate_range($range_test_ary, $errors);
// Set forum flags
diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php
index 84f280c779..52919f4f40 100644
--- a/phpBB/language/en/acp/forums.php
+++ b/phpBB/language/en/acp/forums.php
@@ -81,6 +81,7 @@ $lang = array_merge($lang, array(
'FORUM_EDIT_EXPLAIN' => 'The form below will allow you to customise this forum. Please note that moderation and post count controls are set via forum permissions for each user or usergroup.',
'FORUM_IMAGE' => 'Forum image',
'FORUM_IMAGE_EXPLAIN' => 'Location, relative to the phpBB root directory, of an additional image to associate with this forum.',
+ 'FORUM_IMAGE_NO_EXIST' => 'The specified forum image does not exist',
'FORUM_LINK_EXPLAIN' => 'Full URL (including the protocol, i.e.: http://) to the destination location that clicking this forum will take the user, e.g.: http://www.phpbb.com/.',
'FORUM_LINK_TRACK' => 'Track link redirects',
'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.',