From 9333252d19a434c0f2042b398200e83bcd74bea6 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 5 Jun 2017 18:18:07 -0400 Subject: [PATCH] Bug 18732: Noisy t/SMS.t triggered by koha_conf.xml without sms_send_config Content-Type: text/plain; charset=utf-8 Upgraded systems may be lacking sms_send_config which makes t/SMS.t noisy. This silently bypasses the problem. Remove sms_send_config from your koha-conf.xml file prove t/SMS.t -- it will be noisy, but pass. apply patch prove t/SMS.t -- noise gone. run koha qa test tools. Signed-off-by: Lee Jamison Works correctly as indicated by the testing plan. No "uninitialized" noise after patch is applied. Signed-off-by: Marcel de Rooy Slightly amended: turned the iif around. --- C4/SMS.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/C4/SMS.pm b/C4/SMS.pm index c603117..1043c0b 100644 --- a/C4/SMS.pm +++ b/C4/SMS.pm @@ -89,15 +89,17 @@ sub send_sms { my $driver = exists $params->{'driver'} ? $params->{'driver'} : $self->driver(); return unless $driver; - my ($sent, $sender); my $subpath = $driver; $subpath =~ s|::|/|; - my $conf_file = - File::Spec->catfile( C4::Context->config('sms_send_config'), $subpath ) - . q{.yaml}; + my $sms_send_config = C4::Context->config('sms_send_config'); + my $conf_file = defined $sms_send_config + ? File::Spec->catfile( $sms_send_config, $subpath ) + : $subpath; + $conf_file .= q{.yaml}; + my %args; if ( -f $conf_file ) { require YAML; -- 2.1.4