bug 2668 - fix php warnings on glob function

git-svn-id: http://piwigo.org/svn/trunk@16167 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices 2012-06-29 04:25:02 +00:00
parent e39685df6f
commit a05c8c538a
2 changed files with 10 additions and 4 deletions

View file

@ -2360,9 +2360,12 @@ function delete_element_derivatives($infos, $type='all')
$pattern = '-'.derivative_to_url($type).'*';
}
$path = substr_replace($path, $pattern, $dot, 0);
foreach( glob(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$path) as $file)
if ( ($glob=glob(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$path)) !== false)
{
@unlink($file);
foreach( $glob as $file)
{
@unlink($file);
}
}
}
?>