summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-05-01 12:16:06 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-05-01 12:16:06 +0000
commitfb18a39ace6db2ca0043060446be7f3daa60f3da (patch)
tree01e2d6b950a23c1dbb75f1f992c2e5459a51fa2d
parent74eb40e1aef9eb3eab43969fe36e101b241b31fb (diff)
downloadMPC-fb18a39ace6db2ca0043060446be7f3daa60f3da.tar.gz
ChangeLogTag: Thu May 1 07:09:07 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--modules/StringProcessor.pm6
-rw-r--r--modules/WorkspaceCreator.pm6
2 files changed, 10 insertions, 2 deletions
diff --git a/modules/StringProcessor.pm b/modules/StringProcessor.pm
index 9bb05eb5..97a5ab96 100644
--- a/modules/StringProcessor.pm
+++ b/modules/StringProcessor.pm
@@ -79,7 +79,11 @@ sub create_array {
elsif ($val =~ /^\'(.*)\'$/) {
$val = $1;
}
- push(@array, $val);
+
+ ## Only add the value to the array if the string isn't empty
+ if ($val ne '') {
+ push(@array, $val);
+ }
for(; $i < $length; $i++) {
if (substr($line, $i, 1) !~ /\s/) {
$i--;
diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm
index 170707b5..efa6ae54 100644
--- a/modules/WorkspaceCreator.pm
+++ b/modules/WorkspaceCreator.pm
@@ -758,7 +758,11 @@ sub process_cmdline {
if (defined $options) {
foreach my $key (keys %$options) {
my($type) = $self->is_set($key, $options);
- if ($type eq 'ARRAY') {
+
+ if (!defined $type) {
+ ## This option was not used, so we ignore it
+ }
+ elsif ($type eq 'ARRAY') {
push(@{$parameters->{$key}}, @{$options->{$key}});
}
elsif ($type eq 'HASH') {