Bug 18732: Noisy t/SMS.t triggered by koha_conf.xml without sms_send_config

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 <ldjamison@marywood.edu>
Works correctly as indicated by the testing plan.
No "uninitialized" noise after patch is applied.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Slightly amended: turned the iif around.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Mark Tompsett 2017-06-05 18:18:07 -04:00 committed by Jonathan Druart
parent f4c965781d
commit f97addef42
1 changed files with 6 additions and 4 deletions

View File

@ -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;