1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00

Remove always-true condition from php_copy_file_ctx()

srcstream is always checked before.
This commit is contained in:
Niels Dossche
2023-12-11 20:07:13 +01:00
parent a146487739
commit 5e02bca537
+2 -4
View File
@@ -1614,12 +1614,10 @@ safe_to_copy:
deststream = php_stream_open_wrapper_ex(dest, "wb", REPORT_ERRORS, NULL, ctx);
if (srcstream && deststream) {
if (deststream) {
ret = php_stream_copy_to_stream_ex(srcstream, deststream, PHP_STREAM_COPY_ALL, NULL);
}
if (srcstream) {
php_stream_close(srcstream);
}
php_stream_close(srcstream);
if (deststream) {
php_stream_close(deststream);
}