| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function validate(UploadedFile &$file): bool |
||
| 35 | { |
||
| 36 | $contentLength = (int)$this->getServerVar('CONTENT_LENGTH'); |
||
| 37 | $postMaxSize = $this->getConfigBytes(ini_get('post_max_size')); |
||
| 38 | if ($postMaxSize && ($contentLength > $postMaxSize)) { |
||
| 39 | $file->error = $this->message; |
||
| 40 | |||
| 41 | return false; |
||
| 42 | } |
||
| 43 | |||
| 44 | return true; |
||
| 45 | } |
||
| 46 | |||
| 74 |