]> granicus.if.org Git - php/commitdiff
down to 1 failing zip test with this commit
authorGreg Beaver <cellog@php.net>
Sat, 23 Feb 2008 18:28:36 +0000 (18:28 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 23 Feb 2008 18:28:36 +0000 (18:28 +0000)
ext/phar/tests/zip/phar_setdefaultstub.phpt
ext/phar/zip.c

index 10bfc6c475608138a17423a81883271db65a5cbf..e21d7644878453562c942e0f3642a9030428ae11 100644 (file)
@@ -2,6 +2,8 @@
 Phar: Phar::setDefaultStub() with and without arg, zip-based phar
 --SKIPIF--
 <?php if (!extension_loaded("phar")) die("skip"); ?>
+--INI--
+phar.readonly=0
 --FILE--
 <?php
 
index db307fffee70cb7a194360d3ae16aaaa3b0365e2..7ae5a8626136d66e6ffc67cbed01e5dd023d16f6 100644 (file)
@@ -691,7 +691,7 @@ int phar_zip_flush(phar_archive_data *phar, char *user_stub, long len, char **er
        }
 
        /* set stub */
-       if (user_stub && !len) {
+       if (user_stub && len) {
                if (len < 0) {
                        /* resource passed in */
                        if (!(php_stream_from_zval_no_verify(stubfile, (zval **)user_stub))) {