]> granicus.if.org Git - php/commitdiff
Be able to handle strings as well as arrays in _multipleToStruct()
authorTomas V.V.Cox <cox@php.net>
Fri, 31 May 2002 18:12:56 +0000 (18:12 +0000)
committerTomas V.V.Cox <cox@php.net>
Fri, 31 May 2002 18:12:56 +0000 (18:12 +0000)
pear/System.php

index 0f35eb1220bf3bf22a8a4da5d49173e9a14d2f4a..3fd25e082fb2c347c09802d0d4f15cff398bd0af 100644 (file)
@@ -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);