From 426146b34007a675f700b59df494ee385c2233d4 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 27 Jan 2007 22:18:18 +0000 Subject: [PATCH] - More on 5.2.1 support --- ext/phar/phar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 7a58331c8c..6b5c8dabc3 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -314,7 +314,7 @@ static int phar_get_entry_data(phar_entry_data **ret, char *fname, int fname_len memfp->fpos = 0; memfp->fsize = 0; } else if (php_stream_is(*(php_stream**)entry->fp->abstract, PHP_STREAM_IS_STDIO)) { - php_stream_truncate_set_size(entry->fp, 0); + php_stream_truncate_set_size(*(php_stream**)entry->fp->abstract, 0); } else { efree(*ret); *ret = NULL; @@ -323,6 +323,8 @@ static int phar_get_entry_data(phar_entry_data **ret, char *fname, int fname_len } return FAILURE; } + } else if (php_stream_is(entry->fp, PHP_STREAM_IS_STDIO)) { + php_stream_truncate_set_size(entry->fp, 0); } else { efree(*ret); *ret = NULL; -- 2.50.1