--- Net_FTPTest.php 2008/05/19 18:08:23 1.7.2.5
+++ Net_FTPTest.php 2008/05/20 07:59:07 1.7.2.6
@@ -26,7 +26,7 @@
* @author Tobias Schlitt <toby@php.net>
* @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Net_FTP-1.3.7-test.patch,v 1.1 2008/05/20 15:41:43 remi Exp $
+ * @version CVS: $Id: Net_FTP-1.3.7-test.patch,v 1.1 2008/05/20 15:41:43 remi Exp $
* @link http://pear.php.net/package/Net_FTP
* @link http://www.phpunit.de PHPUnit
* @since File available since Release 1.3.3
@@ -274,7 +274,7 @@
$this->assertFalse(PEAR::isError($dirlist));
$dirlist = $this->_getNames($dirlist);
- $dirlistok = array($this->_getLastPart($tmpfile[$i]), '.', '..');
+ $dirlistok = array($this->_getLastPart($tmpfile[$i]));
if ($i < 2) {
$dirlistok[] = $this->_getLastPart($tmpdir[$i+1]);
}
@@ -408,7 +408,7 @@
}
/**
- * Return all name keys in the elements of an array
+ * Return all name keys in the elements of an array, leaving out . and ..
*
* @param array $in Multidimensional array
*
@@ -418,7 +418,9 @@
{
$return = array();
foreach ($in as $v) {
- $return[] = $v['name'];
+ if ($v['name'] != '.' && $v['name'] != '..') {
+ $return[] = $v['name'];
+ }
}
return $return;
}