From:             c dot hugot at uniteam dot fr
Operating system: windows xp with wamp
PHP version:      5.3SVN-2009-12-01 (SVN)
PHP Bug Type:     Output Control
Bug description:  Problem with the function ZipArchive::deleteName()

Description:
------------
I create an archive (.zip) with class ZipArchive, with four files into. 
And when I want to delete the last file, in this archive, the function
deleteName() return true, but the file is not remove from the archive.
The three others files were correctly remove, but not the last.

Reproduce code:
---------------
---
>From manual page: function.ziparchive-deletename
---

        private function myDelZipFile($p_sName){
            $l_oZip = new ZipArchive();                       
            if($l_oZip->open(RACCORDEMENT_ZIP_FILE_PATH . "/" .
$_SESSION['step5']['zip_name'] . ".zip", ZIPARCHIVE::OVERWRITE) === true){
                $l_oZip->deleteName( $_SESSION['step5'][$p_sName .
'_name']) === true;
                $l_oZip->close();                
                return true;
            }            
            return false;            
        }

Expected result:
----------------
The archive file ever contained the last file. 

Actual result:
--------------
The archive would be empty.

-- 
Edit bug report at http://bugs.php.net/?id=50349&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50349&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50349&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50349&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50349&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50349&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50349&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50349&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50349&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50349&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50349&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50349&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50349&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50349&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50349&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50349&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50349&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50349&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50349&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50349&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50349&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50349&r=mysqlcfg

Reply via email to