]> granicus.if.org Git - php/commitdiff
* silence warning
authorStig Bakken <ssb@php.net>
Wed, 30 Jan 2002 12:18:10 +0000 (12:18 +0000)
committerStig Bakken <ssb@php.net>
Wed, 30 Jan 2002 12:18:10 +0000 (12:18 +0000)
pear/PEAR/Common.php

index e38e549d15eff19bfb89385a844984ce359a58aa..b6414e72b7b3d010b8f099fbe537f0f71f1fdc5d 100644 (file)
@@ -280,8 +280,10 @@ class PEAR_Common extends PEAR
             case 'file':
                 $this->current_file = $data;
                 $path = '';
-                foreach ($this->dir_names as $dir) {
-                    $path .= $dir . DIRECTORY_SEPARATOR;
+                if (!empty($this->dir_names)) {
+                    foreach ($this->dir_names as $dir) {
+                        $path .= $dir . DIRECTORY_SEPARATOR;
+                    }
                 }
                 $path .= $this->current_file;
                 $this->filelist[$path] = $this->current_attributes;
@@ -299,8 +301,10 @@ class PEAR_Common extends PEAR
             case 'libfile':
                 $this->lib_name = $data;
                 $path = '';
-                foreach ($this->dir_names as $dir) {
-                    $path .= $dir . DIRECTORY_SEPARATOR;
+                if (!empty($this->dir_names)) {
+                    foreach ($this->dir_names as $dir) {
+                        $path .= $dir . DIRECTORY_SEPARATOR;
+                    }
                 }
                 $path .= $this->lib_name;
                 $this->filelist[$path] = $this->lib_atts;