Changeset 27192


Ignore:
Timestamp:
04/17/13 15:14:58 (8 years ago)
Author:
davidb
Message:

Extra test added to avoid putting 'undef' into an array of values. Problem originally showed up with 'indexoptions'

Location:
main/trunk/greenstone2/perllib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/basebuilder.pm

    r26567 r27192  
    288288
    289289    my $separate_cjk = 0;
    290    
    291     if (defined($self->{'collect_cfg'}->{'indexoptions'})) {
    292     foreach my $option (@{$self->{'collect_cfg'}->{'indexoptions'}}) {
     290
     291    my $indexoptions = $self->{'collect_cfg'}->{'indexoptions'};   
     292    if (defined($indexoptions)) {
     293
     294    foreach my $option (@$indexoptions) {
    293295        if ($option =~ /separate_cjk/) {
    294296        $separate_cjk = 1;
  • main/trunk/greenstone2/perllib/collConfigxml.pm

    r27097 r27192  
    203203      }
    204204
    205       push (@{$data->{$key}},$name);
     205      if (defined $name) {
     206      push (@{$data->{$key}},$name);
     207      }
    206208    }
    207209
Note: See TracChangeset for help on using the changeset viewer.