From 39d7df4191e99f0808610e5a1173dbfcf4c46f48 Mon Sep 17 00:00:00 2001 From: arensb Date: Wed, 2 Oct 2002 23:38:47 +0000 Subject: [PATCH] Fixed some run-time bugs, so it'll actually load. --- C4/Context.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index d0a8a270fb..4177f3d654 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -99,7 +99,7 @@ $context = undef; # Initially, no context is set sub read_config_file { my $fname = shift; # Config file to read - my $retval; # Return value: ref-to-hash holding the + my $retval = {}; # Return value: ref-to-hash holding the # configuration open (CONF, $fname) or return undef; @@ -141,7 +141,8 @@ sub import # Create a new context from the given config file name, if # any, then set it as the current context. - $context = __PACKAGE__->new($conf_fname); + $context = new C4::Context($conf_fname); + return undef if !defined($context); $context->set_context; } @@ -178,7 +179,7 @@ sub new # Load the desired config file. $self->{"config"} = &read_config_file($conf_fname); - return null if !defined($self->{"config"}); + return undef if !defined($self->{"config"}); $self->{"dbh"} = undef; # Database handle -- 2.39.5