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-07-27 04:47 am

[dw-free] In my testing, this doesn't seem to break anything, and fixes an ordering problem causing

[commit: http://hg.dwscoalition.org/dw-free/rev/847b1db4f477]

In my testing, this doesn't seem to break anything, and fixes an ordering
problem causing weblib to be loaded before the etc/config files.

Also attempt to fix error with uninitialized values in this regex.

Patch by [staff profile] mark.

Files modified:
  • cgi-bin/DW/InviteCodes.pm
  • cgi-bin/LJ/NotificationMethod/DebugLog.pm
  • cgi-bin/LJ/NotificationMethod/Email.pm
--------------------------------------------------------------------------------
diff -r f73610f26ec3 -r 847b1db4f477 cgi-bin/DW/InviteCodes.pm
--- a/cgi-bin/DW/InviteCodes.pm	Mon Jul 27 04:06:59 2009 +0000
+++ b/cgi-bin/DW/InviteCodes.pm	Mon Jul 27 04:47:34 2009 +0000
@@ -154,7 +154,7 @@ sub get_promo_code_info {
     my $dbh = LJ::get_db_writer();
     my $code = $opts{code};
 
-    return undef unless $code =~ /^[a-z0-9]+$/i; # make sure the code is valid first
+    return undef unless $code && $code =~ /^[a-z0-9]+$/i; # make sure the code is valid first
     return $dbh->selectrow_hashref( "SELECT * FROM acctcode_promo WHERE code = ?", undef, $code );
 }
 
diff -r f73610f26ec3 -r 847b1db4f477 cgi-bin/LJ/NotificationMethod/DebugLog.pm
--- a/cgi-bin/LJ/NotificationMethod/DebugLog.pm	Mon Jul 27 04:06:59 2009 +0000
+++ b/cgi-bin/LJ/NotificationMethod/DebugLog.pm	Mon Jul 27 04:47:34 2009 +0000
@@ -4,7 +4,7 @@ use Carp qw/ croak /;
 use Carp qw/ croak /;
 use base 'LJ::NotificationMethod';
 use lib "$LJ::HOME/cgi-bin";
-require "weblib.pl";
+#require "weblib.pl";
 
 sub can_digest { 1 };
 
diff -r f73610f26ec3 -r 847b1db4f477 cgi-bin/LJ/NotificationMethod/Email.pm
--- a/cgi-bin/LJ/NotificationMethod/Email.pm	Mon Jul 27 04:06:59 2009 +0000
+++ b/cgi-bin/LJ/NotificationMethod/Email.pm	Mon Jul 27 04:47:34 2009 +0000
@@ -5,7 +5,7 @@ use base 'LJ::NotificationMethod';
 use base 'LJ::NotificationMethod';
 
 use lib "$LJ::HOME/cgi-bin";
-require "weblib.pl";
+#require "weblib.pl";
 
 sub can_digest { 1 };
 
--------------------------------------------------------------------------------