Bug 11135: (follow-up) improve testing of OVERRIDE_SYSPREF_NAMES

This is a bit pedantic -- since for obvious reasons, I can't
see us ever letting '0' be the name of a system preference,
and I suspect it's impossible for the value of something in the
$ENV hash to be undefined -- but better to test for exactly what
we mean.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2013-10-31 14:21:25 +00:00
parent ded0db9d63
commit c59f17e454
1 changed files with 3 additions and 1 deletions

View File

@ -122,7 +122,9 @@ sub TransformPrefsToHTML {
$tab = { '' => $tab } if ( ref( $tab ) eq 'ARRAY' );
my @override_syspref_names;
if ( $ENV{OVERRIDE_SYSPREF_NAMES} ) {
if ( exists($ENV{OVERRIDE_SYSPREF_NAMES}) &&
defined($ENV{OVERRIDE_SYSPREF_NAMES})
) {
@override_syspref_names = split /,/, $ENV{OVERRIDE_SYSPREF_NAMES};
}