summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--globals.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/globals.pl b/globals.pl
index 1a6990ac5..194d00d07 100644
--- a/globals.pl
+++ b/globals.pl
@@ -348,7 +348,7 @@ sub DBname_to_id {
my ($name) = (@_);
SendSQL("select userid from profiles where login_name = @{[SqlQuote($name)]}");
my $r = FetchOneColumn();
- if ($r eq "") {
+ if (!defined $r || $r eq "") {
return 0;
}
return $r;