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:
parent
f6575d02e1
commit
765bfa10b1
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue