Hi, again.

The attached patch eliminates the following message from our logs:

/openils/var/log/open-ils.storage_unix.log:Use of uninitialized value in join or string at /usr/local/share/perl/5.8.8/OpenSRF/Application.pm line 118.

Instead, we get something like this:

/openils/var/log/osrfsys.log:[2010-04-15 10:26:10] open-ils.circ [INFO:10750:Application.pm:125:1271341552107790] CALL: open-ils.circ.circ_modifier.retrieve.all [undef]

Which seems to be closer to the original intent.

Though this patch is also fairly trivial, I have attached a DCO.

Jason
Index: src/perl/lib/OpenSRF/Application.pm
===================================================================
--- src/perl/lib/OpenSRF/Application.pm	(revision 1945)
+++ src/perl/lib/OpenSRF/Application.pm	(working copy)
@@ -115,6 +115,13 @@
         my @p = $app_msg->params;
 		my $method_name = $app_msg->method;
 		my $method_proto = $session->last_message_api_level;
+
+		# Attempt to cleanup the msg params:
+		my $i;
+		for ($i = 0; $i <= $#p; $i++) {
+			$p[$i] = 'undef' unless(defined($p[$i]));
+		}
+
 		$log->info("CALL: $method_name [". (@p ? join(', ',@p) : '') ."]");
 
 		my $coderef = $app->method_lookup( $method_name, $method_proto, 1, 1 );
Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Jason Stephenson <[email protected]>

Reply via email to