Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use built-in php constants #3725

Closed
wants to merge 1 commit into from

2 participants

@Slamdunk

Constants are much more readable and maintainable then plain numbers

@weierophinney weierophinney was assigned
@weierophinney weierophinney referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/3725' into develop
Forward port #3725
8e30a5e
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/3725'
Close #3725
c90d937
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/3725' into develop
Forward port #3725
c7de141
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-validator
@weierophinney weierophinney Merge branch 'hotfix/3725' 929eb12
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-validator
@weierophinney weierophinney Merge branch 'hotfix/3725' into develop a2eb7bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 8, 2013
  1. @Slamdunk
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 8 deletions.
  1. +8 −8 library/Zend/Validator/File/UploadFile.php
View
16 library/Zend/Validator/File/UploadFile.php
@@ -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;
Something went wrong with that request. Please try again.