Eliminate warnings in LJ::Test

        Patch by szabgab. 

diffs (30 lines):

diff -r 64f0c8961635 -r a9d29c10de69 cgi-bin/LJ/Test.pm
--- a/cgi-bin/LJ/Test.pm        Thu Sep 03 16:49:29 2009 +0000
+++ b/cgi-bin/LJ/Test.pm        Thu Sep 03 17:09:33 2009 +0000
@@ -62,7 +62,7 @@ sub theschwartz {
 }
 
 sub temp_user {
-    shift() if $_[0] eq __PACKAGE__;
+    shift() if defined($_[0]) and $_[0] eq __PACKAGE__;
     my %args = @_;
     my $underscore  = delete $args{'underscore'};
     my $journaltype = delete $args{'journaltype'}  || "P";
@@ -86,7 +86,7 @@ sub temp_user {
 }
 
 sub temp_comm {
-    shift() if $_[0] eq __PACKAGE__;
+    shift() if defined($_[0]) and $_[0] eq __PACKAGE__;
 
     # make a normal user
     my $u = temp_user();
@@ -103,7 +103,7 @@ sub temp_comm {
 }
 
 sub temp_feed {
-    shift() if $_[0] eq __PACKAGE__;
+    shift() if defined($_[0]) and $_[0] eq __PACKAGE__;
 
     # make a normal user
     my $u = temp_user();
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to