Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/File/UploadFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,37 +77,37 @@ public function isValid($value)
}

switch ($error) {
case 0:
case UPLOAD_ERR_OK:
if (!is_uploaded_file($file)) {
$this->error(self::ATTACK);
}
break;

case 1:
case UPLOAD_ERR_INI_SIZE:
$this->error(self::INI_SIZE);
break;

case 2:
case UPLOAD_ERR_FORM_SIZE:
$this->error(self::FORM_SIZE);
break;

case 3:
case UPLOAD_ERR_PARTIAL:
$this->error(self::PARTIAL);
break;

case 4:
case UPLOAD_ERR_NO_FILE:
$this->error(self::NO_FILE);
break;

case 6:
case UPLOAD_ERR_NO_TMP_DIR:
$this->error(self::NO_TMP_DIR);
break;

case 7:
case UPLOAD_ERR_CANT_WRITE:
$this->error(self::CANT_WRITE);
break;

case 8:
case UPLOAD_ERR_EXTENSION:
$this->error(self::EXTENSION);
break;

Expand Down

0 comments on commit 929eb12

Please sign in to comment.