From 55c5bc126decffeaa74abdb853eb010cc3dcda8c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 18 Apr 2015 14:01:21 +0200 Subject: [PATCH] [ticket/8672] User $user->lang() instead of sprintf PHPBB3-8672 --- phpBB/includes/functions_upload.php | 4 ++-- tests/upload/filespec_test.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index ea82a23082..ac5313ca06 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -417,11 +417,11 @@ class filespec { if (!isset($types[$this->image_info['type']])) { - $this->error[] = sprintf($user->lang['IMAGE_FILETYPE_INVALID'], $this->image_info['type'], $this->mimetype); + $this->error[] = $user->lang('IMAGE_FILETYPE_INVALID', $this->image_info['type'], $this->mimetype); } else { - $this->error[] = sprintf($user->lang['IMAGE_FILETYPE_MISMATCH'], $types[$this->image_info['type']][0], $this->extension); + $this->error[] = $user->lang('IMAGE_FILETYPE_MISMATCH', $types[$this->image_info['type']][0], $this->extension); } } diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php index 8fbb437ef0..f6deb242a2 100644 --- a/tests/upload/filespec_test.php +++ b/tests/upload/filespec_test.php @@ -287,7 +287,7 @@ class phpbb_filespec_test extends phpbb_test_case array('txt_copy', 'txt_as_img', 'image/jpg', 'txt', false, true), array('txt_copy_2', 'txt_moved', 'text/plain', 'txt', false, true), array('jpg_copy', 'jpg_moved', 'image/png', 'jpg', false, true), - array('png_copy', 'png_moved', 'image/png', 'jpg', 'IMAGE_FILETYPE_MISMATCH', true), + array('png_copy', 'png_moved', 'image/png', 'jpg', 'IMAGE_FILETYPE_MISMATCH png jpg', true), ); }