@@ 203-210 (lines=8) @@ | ||
200 | $this->setErrors(sprintf('File Size: %u. Maximum Size Allowed: %u', $this->mediaSize, $this->maxFileSize)); |
|
201 | } |
|
202 | ||
203 | if (is_array($this->dimension)) { |
|
204 | if (!$this->checkMaxWidth($this->dimension[0])) { |
|
205 | $this->setErrors(sprintf('File width: %u. Maximum width allowed: %u', $this->dimension[0], $this->maxWidth)); |
|
206 | } |
|
207 | if (!$this->checkMaxHeight($this->dimension[1])) { |
|
208 | $this->setErrors(sprintf('File height: %u. Maximum height allowed: %u', $this->dimension[1], $this->maxHeight)); |
|
209 | } |
|
210 | } |
|
211 | ||
212 | if (count($this->errors) > 0) { |
|
213 | return false; |
|
@@ 358-365 (lines=8) @@ | ||
355 | $this->setErrors(sprintf('File Size: %u. Maximum Size Allowed: %u', $this->mediaSize, $this->maxFileSize)); |
|
356 | } |
|
357 | ||
358 | if (is_array($this->dimension)) { |
|
359 | if (!$this->checkMaxWidth($this->dimension[0])) { |
|
360 | $this->setErrors(sprintf('File width: %u. Maximum width allowed: %u', $this->dimension[0], $this->maxWidth)); |
|
361 | } |
|
362 | if (!$this->checkMaxHeight($this->dimension[1])) { |
|
363 | $this->setErrors(sprintf('File height: %u. Maximum height allowed: %u', $this->dimension[1], $this->maxHeight)); |
|
364 | } |
|
365 | } |
|
366 | ||
367 | if (!$this->checkMimeType()) { |
|
368 | $this->setErrors('MIME type not allowed: ' . $this->mediaType); |