From 0f1276c23a31566b75f7b238254a06a240a02900 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 25 Oct 2025 14:54:49 +0200 Subject: [PATCH] phar: Remove redundant *error check The failure of the iterator is already checked above at line 1157. --- ext/phar/tar.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 8a5df4f443dc3..4847597cce2ea 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -1242,12 +1242,6 @@ ZEND_ATTRIBUTE_NONNULL_ARGS(1, 4) void phar_tar_flush(phar_archive_data *phar, z php_stream_close(oldfile); } - /* on error in the hash iterator above, error is set */ - if (*error) { - php_stream_close(newfile); - return; - } - if (phar->fp && pass.free_fp) { php_stream_close(phar->fp); }