Skip to content

Commit

Permalink
Merge pull request #91 from kinglozzer/php54-compat
Browse files Browse the repository at this point in the history
FIX: PHP 5.4 compatibility
  • Loading branch information
Aaron Carlino authored May 2, 2018
2 parents f942bc8 + ae7d473 commit 0eeab6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/FileAttachmentField.php
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,8 @@ public function upload(SS_HTTPRequest $request) {
}

// No files detected in the upload, this can occur if post_max_size is < the upload size
if(empty($files) || empty($request->postVar($name))) {
$value = $request->postVar($name);
if(empty($files) || empty($value)) {
$error_message = _t('FileAttachmentField.NOFILESUPLOADED', 'No files were detected in your upload. Please try again later.');
return $this->httpError(400, $error_message);
}
Expand Down

0 comments on commit 0eeab6e

Please sign in to comment.