From 765bfa10b11c04168624a08e1b0e31e067c1f76a Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 9 Nov 2004 08:49:15 +0000 Subject: verifies whether the file has a picture extension before trying getimagesize function git-svn-id: http://piwigo.org/svn/trunk@597 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'admin') diff --git a/admin/include/functions.php b/admin/include/functions.php index 9dcd17ebb..54ec9d8b2 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -38,7 +38,8 @@ function is_image( $filename, $create_thumbnail = false ) { global $conf, $tab_ext_create_TN; - if ( is_file( $filename ) ) + if (is_file($filename) + and in_array(get_extension($filename), $conf['picture_ext'])) { $size = getimagesize( $filename ); // $size[2] == 1 means GIF -- cgit v1.2.3