From: Stig Bakken Date: Wed, 30 Jan 2002 12:18:10 +0000 (+0000) Subject: * silence warning X-Git-Tag: PRE_ISSET_PATCH~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a33fd65b12abeb4811d74d0ebe6231109cf55ed9;p=php * silence warning --- diff --git a/pear/PEAR/Common.php b/pear/PEAR/Common.php index e38e549d15..b6414e72b7 100644 --- a/pear/PEAR/Common.php +++ b/pear/PEAR/Common.php @@ -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;