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
This commit is contained in:
plegall 2004-11-09 08:49:15 +00:00
commit 765bfa10b1

View file

@ -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