diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-06-29 04:25:02 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-06-29 04:25:02 +0000 |
commit | a05c8c538a6a1a907dade83fc6c8e3b66bf6253f (patch) | |
tree | 76a476cc79daa337baf8cf90a67d52d47d8dfbab /admin/configuration.php | |
parent | e39685df6f7a8d3d27cddd97211c4ccac5998a94 (diff) |
bug 2668 - fix php warnings on glob function
git-svn-id: http://piwigo.org/svn/trunk@16167 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/configuration.php')
-rw-r--r-- | admin/configuration.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/admin/configuration.php b/admin/configuration.php index 21e5c2b4d..5ea0da672 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -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) |