From: Bill Erickson Date: Tue, 26 Jun 2012 13:21:57 +0000 (-0400) Subject: Prevent "uninitialized value" warnings in parameter logging X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d390d1ae315bd9c9326c9ef76ebf74f57ddaa573;p=working%2FOpenSRF.git Prevent "uninitialized value" warnings in parameter logging Use of uninitialized value $p[0] in join or string at /usr/local/share/perl/5.10.1/OpenSRF/Application.pm line 130. This is caused when the array of method params contains null/undef values. Prevent the warnings by replacing these values w/ empty strings. Signed-off-by: Bill Erickson Signed-off-by: Dan Scott Signed-off-by: Galen Charlton --- diff --git a/src/perl/lib/OpenSRF/Application.pm b/src/perl/lib/OpenSRF/Application.pm index 9283b7f..0a5c188 100644 --- a/src/perl/lib/OpenSRF/Application.pm +++ b/src/perl/lib/OpenSRF/Application.pm @@ -146,7 +146,7 @@ sub handler { if ($redact_params) { $logdata .= "**PARAMS REDACTED**"; } else { - $logdata .= join(', ',@p); + $logdata .= join(', ', map { (defined $_) ? $_ : '' } @p); } } $log->info($logdata);