mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 11:49:56 +03:00
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:
parent
e39685df6f
commit
a05c8c538a
2 changed files with 10 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue