From 0c1617010f22cbddf1fa0c45134663aa7ad66600 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 23 Nov 2007 14:44:53 -0600 Subject: [PATCH] bugfix: fixed quelling of warning if $db_port not specified Signed-off-by: Joshua Ferraro --- C4/Context.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Context.pm b/C4/Context.pm index c40eb701ca..4c7f1aaf87 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -583,7 +583,8 @@ sub _new_dbh my $db_name = $context->config("database"); my $db_host = $context->config("hostname"); - my $db_port = $context->config("port") or ""; + my $db_port = $context->config("port"); + $db_port = "" unless defined $db_port; my $db_user = $context->config("user"); my $db_passwd = $context->config("pass"); my $dbh= DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port", -- 2.39.2