Bugfix in file extension detection
authorMarc MAURICE <dooblempub@positon.org>
Sun, 17 Oct 2010 15:00:21 +0000 (17:00 +0200)
committerMarc MAURICE <dooblempub@positon.org>
Sun, 17 Oct 2010 15:00:21 +0000 (17:00 +0200)
index.php

index db2a590..b9b7309 100644 (file)
--- a/index.php
+++ b/index.php
@@ -9,7 +9,7 @@ function getPreview($imgFile, $maxSize = THUMB_SIZE)
        
        if (! is_file($newImgFile))
        {
-               $ext = strtolower(substr($file, -4));
+               $ext = strtolower(substr($imgFile, -4));
                if ($ext == ".jpg")
                        $img = imagecreatefromjpeg($imgFile);
                else