Changeset 32186 for main


Ignore:
Timestamp:
2018-05-21T12:13:17+12:00 (6 years ago)
Author:
kjdon
Message:

if the eval didn't work, all the return values might be undefined, so check for this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/AutoLoadConverters.pm

    r31492 r32186  
    158158        my ($result, $result_str, $new_filename)
    159159        = eval "\$self->${converter}::convert(\$input_filename, \$output_ext);";
    160         if ($result != 0) {
     160        if (defined $result && $result != 0) {
    161161        return $new_filename;
    162162        }
    163163        my $outhandle=$self->{'outhandle'};
    164164        print $outhandle "$converter Conversion error\n";
    165         print $outhandle $result_str;
     165        print $outhandle "$@\n";
     166        if (defined $result_str) {
     167        print $outhandle "$result_str\n";
     168        }
    166169        return "";
    167170    }
Note: See TracChangeset for help on using the changeset viewer.