From a33fd65b12abeb4811d74d0ebe6231109cf55ed9 Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Wed, 30 Jan 2002 12:18:10 +0000 Subject: [PATCH] * silence warning --- pear/PEAR/Common.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; -- 2.50.1