mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
MFH:
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
This commit is contained in:
parent
03243d7e17
commit
e45c0bb900
1 changed files with 7 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue