From d80367c5fc14554a97b7b455f6cfa782dca942fc Mon Sep 17 00:00:00 2001 From: rxu Date: Thu, 24 Sep 2020 23:48:57 +0700 Subject: [PATCH] [ticket/16604] Adjust filesystem service dependency injection placement PHPBB3-16604 --- phpBB/includes/acp/acp_board.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index a9c6032a2e..3641e28309 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -512,8 +512,6 @@ class acp_board if ($mode == 'avatar' && $cfg_array['allow_avatar_upload']) { - $filesystem = $phpbb_container->get('filesystem'); - // If avatar uploading is enabled but the path setting is empty, // config variable validation is bypassed. Catch the case here if (!$cfg_array['avatar_path']) @@ -522,6 +520,7 @@ class acp_board } else { + $filesystem = $phpbb_container->get('filesystem'); $avatar_path_exists = $filesystem->exists($phpbb_root_path . $cfg_array['avatar_path']); $avatar_path_writable = $filesystem->is_writable($phpbb_root_path . $cfg_array['avatar_path']);