fixed a bug where webgui would crash if only one auth method was specified in the site config

This commit is contained in:
JT Smith 2003-04-05 06:40:30 +00:00
parent 7b61b3f8d9
commit 6d7d526330

View file

@ -348,6 +348,9 @@ sub open {
foreach ($config->directives) {
$session{config}{$_} = $config->get($_);
}
if (ref $session{config}{authMethods} ne "ARRAY") {
$session{config}{authMethods} = [$session{config}{authMethods}];
}
if( defined( $session{config}{scripturl} ) ) {
# get rid of leading "/" if present.
$session{config}{scripturl} =~ s/^\///;