Skip to content

Commit

Permalink
FIX: PHP 5.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kinglozzer committed May 1, 2018
1 parent f942bc8 commit ae7d473
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 ae7d473

Please sign in to comment.