From: Greg Beaver Date: Tue, 12 Feb 2008 05:16:53 +0000 (+0000) Subject: fix some of the failing tests due to non-reopened phar fp X-Git-Tag: RELEASE_2_0_0a1~514 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f1ec934af8e17418a0c7a14d1655cc24dfe5da9;p=php fix some of the failing tests due to non-reopened phar fp --- 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;