summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-04-09 10:17:18 +0200
committerYorhel <git@yorhel.nl>2021-04-09 10:17:18 +0200
commit9e4318867ce948d1128fbaf30bd2dde3a399983e (patch)
tree280b85abe220063472cd3ea03963909c277c356a
parentf4a9567af64e82519093845299b43ac7be03e481 (diff)
Fixup: dbobj() should return undef if no id is given
-rw-r--r--lib/VNWeb/Prelude.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VNWeb/Prelude.pm b/lib/VNWeb/Prelude.pm
index 1d7c4f29..d774c397 100644
--- a/lib/VNWeb/Prelude.pm
+++ b/lib/VNWeb/Prelude.pm
@@ -109,6 +109,7 @@ our %RE = (
sub dbobj {
my($id) = @_;
+ return undef if !$id;
if($id =~ /^u/) {
my $o = tuwf->dbRowi('SELECT id, ', sql_user(), 'FROM users u WHERE id =', \$id);
$o->{title} = VNWeb::HTML::user_displayname $o;