cvs: php4 /pear System.php
| From: | Tomas V.V.Cox | Date: | Fri, 31 May 2002 18:13:01 +0000 |
| Subject: | cvs: php4 /pear System.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4325@lists.php.net to get a copy of this message | ||
cox Fri May 31 14:13:01 2002 EDT
Modified files:
/php4/pear System.php
Log:
Be able to handle strings as well as arrays in _multipleToStruct()
Index: php4/pear/System.php
diff -u php4/pear/System.php:1.12 php4/pear/System.php:1.13
--- php4/pear/System.php:1.12 Fri May 31 13:47:19 2002
+++ php4/pear/System.php Fri May 31 14:12:56 2002
@@ -16,7 +16,7 @@
// | Authors: Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: System.php,v 1.12 2002/05/31 17:47:19 cox Exp $
+// $Id: System.php,v 1.13 2002/05/31 18:12:56 cox Exp $
//
require_once 'PEAR.php';
@@ -43,7 +43,7 @@
*
* @package System
* @author Tomas V.V.Cox <cox@idecnet.com>
-* @version $Revision: 1.12 $
+* @version $Revision: 1.13 $
* @access public
* @see http://pear.php.net/manual/
*/
@@ -147,7 +147,8 @@
function _multipleToStruct($files)
{
$struct = array('dirs' => array(), 'files' => array());
- foreach($files as $file) {
+ settype($files, 'array');
+ foreach ($files as $file) {
if (is_dir($file)) {
$tmp = System::_dirToStruct($file, 0);
$struct = array_merge_recursive($tmp, $struct);