From: Kalle Sommer Nielsen Date: Wed, 1 Apr 2009 09:20:35 +0000 (+0000) Subject: Fixed a few warnings from copy(): X-Git-Tag: php-5.4.0alpha1~191^2~4004 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a21bcabfaa1f9ae0692882cf26e19deaea3d5f2;p=php Fixed a few warnings from copy(): * If $item is empty then skip to next entry, this fixes the "The first argument cannot be a directory" warnings * If file does not exist then dont try to copy it --- diff --git a/win32/build/mkdist.php b/win32/build/mkdist.php index 5d25425593..1ec7c679ae 100644 --- a/win32/build/mkdist.php +++ b/win32/build/mkdist.php @@ -112,6 +112,13 @@ function copy_file_list($source_dir, $dest_dir, $list) global $is_debug, $dist_dir; foreach ($list as $item) { + if (empty($item)) { + continue; + } elseif (!is_file($source_dir . DIRECTORY_SEPARATOR . $item)) { + echo "WARNING: $item not found\n"; + continue; + } + echo "Copying $item from $source_dir to $dest_dir\n"; copy($source_dir . DIRECTORY_SEPARATOR . $item, $dest_dir . DIRECTORY_SEPARATOR . $item); if ($is_debug) {