From 2f1ec934af8e17418a0c7a14d1655cc24dfe5da9 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Tue, 12 Feb 2008 05:16:53 +0000 Subject: [PATCH] fix some of the failing tests due to non-reopened phar fp --- ext/phar/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/phar/util.c b/ext/phar/util.c index af9abaf14a..4b4bfc27fa 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -26,6 +26,10 @@ php_stream *phar_get_efp(phar_entry_info *entry) { if (entry->fp_type == PHAR_FP) { + if (!entry->phar->fp) { + /* re-open just in time for cases where our refcount reached 0 on the phar archive */ + phar_open_archive_fp(entry->phar TSRMLS_CC); + } return entry->phar->fp; } else if (entry->fp_type == PHAR_UFP) { return entry->phar->ufp; -- 2.50.1