diff options
| author | Eliot Whalan <ewhal@pantsu.cat> | 2016-06-21 23:40:58 +0200 |
|---|---|---|
| committer | Eliot Whalan <ewhal@pantsu.cat> | 2016-06-21 23:40:58 +0200 |
| commit | e0717d467120f25c007bf6a80eb26091ce878d56 (patch) | |
| tree | 575f75ee14684009742b186df903bea34ad9f204 /php | |
| parent | 0d7028c01d85405fe441bdc0cc7448bb59a9cf19 (diff) | |
Replaced tabs and make filter array empty
Diffstat (limited to 'php')
| -rw-r--r-- | php/includes/settings.inc.php | 2 | ||||
| -rw-r--r-- | php/upload.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/php/includes/settings.inc.php b/php/includes/settings.inc.php index 6e70569..4468669 100644 --- a/php/includes/settings.inc.php +++ b/php/includes/settings.inc.php @@ -93,7 +93,7 @@ define('ID_CHARSET', 'abcdefghijklmnopqrstuvwxyz'); * Filtered mime types * @param string[] $FILTER_MIME allowed/blocked mime types */ -$FILTER_MIME = array(""); +$FILTER_MIME = array(); /** * Filter mode: whitelist (true) or blacklist (false) * @param bool $FILTER_MODE mime type filter mode diff --git a/php/upload.php b/php/upload.php index d63ee5e..ec7968e 100644 --- a/php/upload.php +++ b/php/upload.php @@ -87,11 +87,11 @@ function uploadFile($file) if (!empty($FILTER_MIME)) { if ($FILTER_MODE == true) { //whitelist mode if (!in_array($file->mime, $FILTER_MIME)) { - throw new UploadException(UPLOAD_ERR_EXTENSION); - } + throw new UploadException(UPLOAD_ERR_EXTENSION); + } } else { //blacklist mode if (in_array($file->mime, $FILTER_MIME)) { - throw new UploadException(UPLOAD_ERR_EXTENSION); + throw new UploadException(UPLOAD_ERR_EXTENSION); } } } |
