From: Michael Andreen Date: Fri, 29 Dec 2006 17:25:35 +0000 (+0000) Subject: more fatal warnings and other cleanup X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=089d1295b36afe84e412a35a8f8f3bd24b90c021;p=ndwebbie.git more fatal warnings and other cleanup --- diff --git a/users.pl b/users.pl index 20687a5..10cf840 100644 --- a/users.pl +++ b/users.pl @@ -19,7 +19,6 @@ use strict; use warnings FATAL => 'all'; -no warnings qw(uninitialized); use POSIX; our $BODY; our $DBH; @@ -31,7 +30,7 @@ die "You don't have access" unless isHC(); my $error = ''; my $user; -if (param('user') =~ /^(\d+)$/){ +if (defined param('user') && param('user') =~ /^(\d+)$/){ my $query = $DBH->prepare(q{ SELECT uid,username,hostmask,coords(x,y,z) AS planet,attack_points,defense_points,scan_points,humor_points FROM users u LEFT OUTER JOIN current_planet_stats p ON u.planet = p.id @@ -41,7 +40,7 @@ WHERE uid = ?; } -if ($user && param('cmd') eq 'change'){ +if ($user && defined param('cmd') && param('cmd') eq 'change'){ $DBH->begin_work; for my $param (param()){ if ($param =~ /^c:(\w+)$/){