Skip to content

Commit

Permalink
Fixed issue #17250: Unable to upload image with extension in uppercas…
Browse files Browse the repository at this point in the history
…e in Theme option (#1884)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
  • Loading branch information
gabrieljenik and encuestabizdevgit committed May 18, 2021
1 parent 51a1963 commit 6169a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/core/LSYii_ImageValidator.php
Expand Up @@ -29,12 +29,12 @@ public static function validateImage($file)
{
if (is_array($file)) {
$path = $file['tmp_name'];
$extension = pathinfo($file['name'], PATHINFO_EXTENSION);
$extension = strtolower(pathinfo($file['name'], PATHINFO_EXTENSION));
$type = $file['type'];
} elseif (is_string($file)) {
$parts = explode('.', $file);
$path = $file;
$extension = pathinfo($file, PATHINFO_EXTENSION);
$extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
$type = 'image/' . $extension;
} else {
return [
Expand Down

0 comments on commit 6169a44

Please sign in to comment.