aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/phpbb/files/filespec.php2
-rw-r--r--tests/upload/filespec_test.php5
2 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/phpbb/files/filespec.php b/phpBB/phpbb/files/filespec.php
index 3f50488e7c..2fdba2d793 100644
--- a/phpBB/phpbb/files/filespec.php
+++ b/phpBB/phpbb/files/filespec.php
@@ -426,7 +426,7 @@ class filespec
$this->height = $this->image_info['height'];
// Check image type
- $types = \fileupload::image_types();
+ $types = upload::image_types();
if (!isset($types[$this->image_info['type']]) || !in_array($this->extension, $types[$this->image_info['type']]))
{
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index f953970f64..f3260bf1a9 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -91,7 +91,8 @@ class phpbb_filespec_test extends phpbb_test_case
'error' => '',
);
- return new filespec(array_merge($upload_ary, $override), null, $this->filesystem, $this->mimetype_guesser);
+ $filespec = new \phpbb\files\filespec($this->filesystem, $this->mimetype_guesser);
+ return $filespec->set_upload_ary(array_merge($upload_ary, $override));
}
protected function tearDown()
@@ -226,7 +227,7 @@ class phpbb_filespec_test extends phpbb_test_case
*/
public function test_get_extension($filename, $expected)
{
- $this->assertEquals($expected, filespec::get_extension($filename));
+ $this->assertEquals($expected, \phpbb\files\filespec::get_extension($filename));
}
public function is_image_variables()