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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user