1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/15286] Update tests

PHPBB3-15286
This commit is contained in:
Rubén Calvo
2017-08-09 22:23:23 +02:00
parent a176fa56ef
commit 5111d8a339
9 changed files with 81 additions and 25 deletions

View File

@@ -161,6 +161,15 @@ class upload
// Make sure the image category only holds valid images...
$this->check_image($is_image);
if (count($this->file->error))
{
$this->file->remove($this->storage);
$this->file_data['error'] = array_merge($this->file_data['error'], $this->file->error);
$this->file_data['post_attach'] = false;
return $this->file_data;
}
$this->fill_file_data();
$filedata = $this->file_data;
@@ -194,15 +203,6 @@ class upload
// Only then perform additional image checks.
$this->file->move_file($this->storage, false, !$is_image);
if (count($this->file->error))
{
$this->file->remove($this->storage);
$this->file_data['error'] = array_merge($this->file_data['error'], $this->file->error);
$this->file_data['post_attach'] = false;
return $this->file_data;
}
return $this->file_data;
}