diff --git a/ext/phar/tar.c b/ext/phar/tar.c index a8ea9056c96..c8477e9e992 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -1172,13 +1172,13 @@ nostub: zend_hash_apply_with_argument(&phar->manifest, phar_tar_writeheaders, (void *) &pass); if (error && *error) { - if (closeoldfile) { + if (must_close_old_file) { php_stream_close(oldfile); } /* on error in the hash iterator above, error is set */ php_stream_close(newfile); - return EOF; + return; } /* add signature for executable tars or tars explicitly set with setSignatureAlgorithm */