aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 45eda4ba17..034cbd1c51 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1505,6 +1505,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
{
global $db, $auth, $user, $config, $phpEx, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher, $phpbb_log, $request;
+ $attachment_storage = $phpbb_container->get('storage.attachment');
+
$poll = $poll_ary;
$data = $data_ary;
/**
@@ -2098,7 +2100,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
else
{
// insert attachment into db
- if (!@file_exists($phpbb_root_path . $config['upload_path'] . '/' . utf8_basename($orphan_rows[$attach_row['attach_id']]['physical_filename'])))
+ if (!$attachment_storage->exists(utf8_basename($orphan_rows[$attach_row['attach_id']]['physical_filename'])))
{
continue;
}