From: Tomas V.V.Cox Date: Fri, 31 May 2002 18:12:56 +0000 (+0000) Subject: Be able to handle strings as well as arrays in _multipleToStruct() X-Git-Tag: php-4.3.0dev_zend2_alpha1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d43ef2cd0780b42f4a675d37b26f9080624372e;p=php Be able to handle strings as well as arrays in _multipleToStruct() --- diff --git a/pear/System.php b/pear/System.php index 0f35eb1220..3fd25e082f 100644 --- a/pear/System.php +++ b/pear/System.php @@ -147,7 +147,8 @@ class System 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);