From ded0db9d63c256ac544873e70eb437afd237a32f Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 24 Oct 2013 17:00:23 +0100 Subject: [PATCH] Bug 11135: avoid logging warnings if OVERRIDE_SYSPREF_NAME is not set Calling split on an undefined var generates warning to the log. Let's check it exists before processing it Signed-off-by: Marcel de Rooy Signed-off-by: Galen Charlton --- admin/preferences.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/preferences.pl b/admin/preferences.pl index 8636afe93e..9a2c8ca327 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -121,7 +121,10 @@ sub TransformPrefsToHTML { my $tab = $data->{ $title }; $tab = { '' => $tab } if ( ref( $tab ) eq 'ARRAY' ); - my @override_syspref_names = split( /,/, $ENV{"OVERRIDE_SYSPREF_NAMES"} ); + my @override_syspref_names; + if ( $ENV{OVERRIDE_SYSPREF_NAMES} ) { + @override_syspref_names = split /,/, $ENV{OVERRIDE_SYSPREF_NAMES}; + } foreach my $group ( sort keys %$tab ) { if ( $group ) { -- 2.39.5