From c59f17e454fa74aebd5506e23cd0b9ec6f0dd4e6 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 31 Oct 2013 14:21:25 +0000 Subject: [PATCH] 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 --- admin/preferences.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/preferences.pl b/admin/preferences.pl index 9a2c8ca327..8bcdb0a0da 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -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}; } -- 2.39.5