diff --git a/ext/standard/file.c b/ext/standard/file.c index 8634f88f60e..5b98c050ade 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1700,12 +1700,6 @@ PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC) { php_stream *srcstream = NULL, *deststream = NULL; int ret = FAILURE; - struct stat src_s, dest_s; - - /* safety check to ensure that source & destination files are not the same file */ - if (stat(src, &src_s) || (stat(dest, &dest_s) == 0 && src_s.st_ino == dest_s.st_ino)) { - return ret; - } srcstream = php_stream_open_wrapper(src, "rb", STREAM_DISABLE_OPEN_BASEDIR | REPORT_ERRORS, NULL);