From 4c65eff6612989f9234ebdaf10397fcbca8896d1 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 31 Jan 2005 10:24:05 +0000 Subject: [PATCH] http://mosquito.wordpress.org/view.php?id=430 git-svn-id: https://develop.svn.wordpress.org/trunk@2170 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/upload.php b/wp-admin/upload.php index a0c2ee645e..93668667c1 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -105,8 +105,8 @@ case 'upload': $tmppathtofile = $pathtofile2; $img2_name = $img1_name; - while (file_exists($pathtofile2)) { - $pos = strpos($tmppathtofile, '.'.trim($imgtype)); + while ( file_exists($pathtofile2) ) { + $pos = strpos( strtolower($tmppathtofile), '.' . trim($imgtype) ); $pathtofile_start = substr($tmppathtofile, 0, $pos); $pathtofile2 = $pathtofile_start.'_'.zeroise($i++, 2).'.'.trim($imgtype); $img2_name = explode('/', $pathtofile2);