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
|
@ -514,9 +514,12 @@ switch ($page['section'])
|
|||
{
|
||||
$watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
|
||||
}
|
||||
foreach (glob(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'watermarks/*.png') as $file)
|
||||
if ( ($glob=glob(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'watermarks/*.png')) !== false)
|
||||
{
|
||||
$watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
|
||||
foreach ($glob as $file)
|
||||
{
|
||||
$watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
|
||||
}
|
||||
}
|
||||
$watermark_filemap = array( '' => '---' );
|
||||
foreach( $watermark_files as $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);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Add table
Reference in a new issue