- if (count($a) == 0
- || $a['next_code'] != "$code"
- || empty($data['tmp_name'])
- || !is_uploaded_file($data['tmp_name'])) {
- return 'Error';
+ if (count($a) == 0) {
+ return "Error: cannot find transfer";
+ }
+ if ($a['next_code'] != "$code") {
+ return "Error: bad transfer code";
+ }
+ if (empty($data['tmp_name'])) {
+ return "Error: missing tmp_name";
+ }
+ if (!is_uploaded_file($data['tmp_name'])) {
+ return "Error: tmp_name may not be uploaded";