Skip to content

Commit 2c2cae2

Browse files
committed
ext/standard: Throw ValueError for empty paths in copy()
1 parent 25d8666 commit 2c2cae2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ext/standard/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ ZEND_ATTRIBUTE_NONNULL_ARGS(1,2) PHPAPI zend_result php_copy_file_ctx(const char
14461446
php_stream_statbuf src_s, dest_s;
14471447
int src_stat_flags = (src_flags & STREAM_DISABLE_OPEN_BASEDIR) ? PHP_STREAM_URL_STAT_IGNORE_OPEN_BASEDIR : 0;
14481448

1449-
if (!dest||!*dest) {
1449+
if (!*dest) {
14501450
zend_argument_must_not_be_empty_error(2);
14511451
return FAILURE;
14521452
}

0 commit comments

Comments
 (0)