Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.2

Bug #16481 Wrong way of getting directory listing
Submitted: 2009-07-30 16:47 UTC
From: kamazee Assigned:
Status: Wont fix Package: Archive_Zip (version 0.1.1)
PHP Version: 5.3.0 OS: Debian
Roadmaps: (Not assigned)    
Subscription  


 [2009-07-30 16:47 UTC] kamazee (Alex Kurilo)
Description: ------------ Just for crazy people who still using this lib. (Lines from 1209) $p_hdir = opendir($p_filename); $p_hitem = readdir($p_hdir); // '.' directory $p_hitem = readdir($p_hdir); // '..' directory while ($p_hitem = readdir($p_hdir)) { '.' and '..' are not always above the real files in listing. So we get an infinitive cycle. If there is a file named like '0' the rest of files won't be listed at all. Solution. Replace the piece of code above with the following: $p_hdir = opendir($p_filename); while (FALSE !== ($p_hitem = readdir($p_hdir))) { if($p_hitem === '.' OR $p_hitem === '..') continue;

Comments

 [2011-07-30 15:38 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Wont fix
Thanks for the fix Alex; but this one is unfortunately a wontfix - the zip extension does a much better job and has superceeded this package.