@@ -35,13 +35,17 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | private function getFileInfo($input) |
| 37 | 37 | { |
| 38 | - if (empty($_FILES[$input])) return; |
|
| 38 | + if (empty($_FILES[$input])) { |
|
| 39 | + return; |
|
| 40 | + } |
|
| 39 | 41 | |
| 40 | 42 | $file = $_FILES[$input]; |
| 41 | 43 | |
| 42 | 44 | $this->error = $file['error']; |
| 43 | 45 | |
| 44 | - if ($this->error != UPLOAD_ERR_OK) return; |
|
| 46 | + if ($this->error != UPLOAD_ERR_OK) { |
|
| 47 | + return; |
|
| 48 | + } |
|
| 45 | 49 | |
| 46 | 50 | $this->file = $file; |
| 47 | 51 | |
@@ -106,7 +110,9 @@ discard block |
||
| 106 | 110 | |
| 107 | 111 | $newName .= '.' . $this->extension; |
| 108 | 112 | |
| 109 | - if (! is_dir($target)) mkdir($target, 0777, true); |
|
| 113 | + if (! is_dir($target)) { |
|
| 114 | + mkdir($target, 0777, true); |
|
| 115 | + } |
|
| 110 | 116 | |
| 111 | 117 | $filePath = $target . $newName; |
| 112 | 118 | |