|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-09-27 00:44 UTC] greg at chiaraquartet dot net
  [2007-10-03 23:07 UTC] greg at chiaraquartet dot net
  [2007-10-03 23:33 UTC] greg at chiaraquartet dot net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 12:00:01 2025 UTC | 
Description: ------------ when attempting to iterate over a phar, if RecursiveDirectoryIterator::KEY_AS_FILENAME is not passed in, we get an exception with an exceptionally odd error message Reproduce code: --------------- <?php $p = new Phar('/tmp/blah.phar'); foreach ($p as $path => $info) { echo $path; } Actual result: -------------- <br /> <b>Fatal error</b>: Uncaught exception 'UnexpectedValueException' with message 'Cannot access phar file entry '/data' in archive '��'' in PHPDocument1:3 Stack trace: #0 [internal function]: PharFileInfo->__construct('phar:///tmp/bla...') #1 PHPDocument1(3): RecursiveDirectoryIterator->current() #2 /var/www/dummy.php(1): include('PHPDocument1') #3 {main} thrown in <b>PHPDocument1</b> on line <b>3</b><br />