mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-08-07 06:59 am

[dw-free] Fix annoying error in logs:

[commit: http://hg.dwscoalition.org/dw-free/rev/3d6682ab6adc]

Fix annoying error in logs:

Use of uninitialized value in int at /home/dw/current/cgi-
bin/Cache/Memcached.pm line 577.

This was caused by the get_timeupdate_multi function having bad support for
the case where it is called with no arguments. Now, if you pass nothing,
you get nothing. (Instead of hitting up Memcache and warning.)

Patch by [staff profile] mark.

Files modified:
  • cgi-bin/ljlib.pl
--------------------------------------------------------------------------------
diff -r 658c278b78f5 -r 3d6682ab6adc cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl	Fri Aug 07 01:53:44 2009 -0500
+++ b/cgi-bin/ljlib.pl	Fri Aug 07 06:59:04 2009 +0000
@@ -370,7 +370,7 @@ sub get_timeupdate_multi {
     my ($opt, @uids) = @_;
 
     # allow optional opt hashref as first argument
-    unless (ref $opt eq 'HASH') {
+    if ( $opt && ref $opt ne 'HASH' ) {
         push @uids, $opt;
         $opt = {};
     }
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org