| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull Requests
Pull requests: 
 HistoryAllCommentsChangesGit/SVN commits             
             [2019-05-21 20:01 UTC] santiagolizardo@php.net
 
-Status:      Open
+Status:      Assigned
-Assigned To:
+Assigned To: santiagolizardo
  [2019-05-25 01:34 UTC] konstantin dot kuklin at gmail dot com
  [2019-10-13 11:08 UTC] santiagolizardo@php.net
 
-Status:      Assigned
+Status:      Open
-Assigned To: santiagolizardo
+Assigned To:
  [2019-10-20 11:22 UTC] ctrujillopineda at gmail dot com
  [2021-09-28 20:27 UTC] cmb@php.net
 
-Status:      Open
+Status:      Verified
-Assigned To:
+Assigned To: cmb
  [2021-09-29 10:11 UTC] cmb@php.net
  [2021-10-04 10:59 UTC] git@php.net
  [2021-10-04 10:59 UTC] git@php.net
 
-Status: Verified
+Status: Closed
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 15:00:01 2025 UTC | 
Description: ------------ If a directory name in a path for a file in zip archive ends with a colon (:) the file will be extracted to the root dir instead of to its original directory. Test script: --------------- <?php $file = tempnam("/tmp", "ziptest"); $target = tempnam("/tmp", "ziptest"); unlink($target); mkdir($target); $zip = new ZipArchive; $zip->open($file); $zip->addFromString("dir/test:/filename.txt", "contents"); $zip->addFromString("dir/test:a/filename.txt", "contents"); $zip->addFromString("dir/test/filename.txt", "contents"); $zip->close(); $zip->open($file); $zip->extractTo($target, "dir/test:/filename.txt"); $zip->extractTo($target, "dir/test:a/filename.txt"); $zip->extractTo($target, "dir/test/filename.txt"); $zip->close(); unlink($file); Expected result: ---------------- Expected behavior would be that the three files were extracted to the following paths: /tmp/ziptest/dir/test:/filename.txt /tmp/ziptest/dir/test:a/filename.txt /tmp/ziptest/dir/test/filename.txt Actual result: -------------- If you run the test script, three files will be extracted to the following paths: /tmp/ziptest/filename.txt /tmp/ziptest/dir/test:a/filename.txt /tmp/ziptest/dir/test/filename.txt