From f3c84114ef7310aa7b5d3e52ed56497b3c1726da Mon Sep 17 00:00:00 2001 From: rvelices Date: Fri, 29 Jun 2012 04:26:22 +0000 Subject: bug 2668 - fix php warnings on glob function (merge from trunk to 2.4) git-svn-id: http://piwigo.org/svn/branches/2.4@16168 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/configuration.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'admin/configuration.php') 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) -- cgit v1.2.3