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

Bug #6037 Directories named "file" make problems
Submitted: 2005-11-22 19:26 UTC
From: toby Assigned: farell
Status: Closed Package: PEAR_PackageFileManager
PHP Version: 5.1.0 OS: Gentoo
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 47 - 20 = ?

 
 [2005-11-22 19:26 UTC] toby
Description: ------------ Directories named "file" make problems because of a lazy check in PackageFileManager2.php. Patch against latest CVS: --- /home/dotxp/dev/PEAR/pear/PEAR_PackageFileManager/PackageFileManager2.php 2005-11-22 19:48:01.000000000 +0100 +++ /home/dotxp/php/5.1/lib/php/PEAR/PackageFileManager2.php 2005-11-22 20:05:34.000000000 +0100 @@ -196,7 +196,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: @PEAR-VER@ + * @version Release: 1.6.0a4^M * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.6.0 */ @@ -1139,7 +1139,7 @@ return $this->_getSimpleDirTag($struc[$dir], $role, ''); } else { // directory - if (!isset($files['file'])) { + if (!isset($files['file']) || is_array($files['file'])) {^M // contains only directories if (isset($dir_roles[$_curdir . $dir])) { $myrole = $dir_roles[$_curdir . $dir]; Test script: --------------- Try packaging a package that contains a directory named "file". Expected result: ---------------- Normal packaging. Actual result: -------------- Warning of array cast, because checked key exists, but has the wrong value type. Missing directories and files below the affected directory.

Comments

 [2006-01-09 17:20 UTC] farell
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. This bug was fixed on PackageFileManager2.php,v 1.19 2005/11/28 00:10:55 cellog by Greg Laurent