diff options
author | Yorhel <git@yorhel.nl> | 2021-04-09 10:17:18 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-04-09 10:17:18 +0200 |
commit | 9e4318867ce948d1128fbaf30bd2dde3a399983e (patch) | |
tree | 280b85abe220063472cd3ea03963909c277c356a /lib/VNWeb/Prelude.pm | |
parent | f4a9567af64e82519093845299b43ac7be03e481 (diff) |
Fixup: dbobj() should return undef if no id is given
Diffstat (limited to 'lib/VNWeb/Prelude.pm')
-rw-r--r-- | lib/VNWeb/Prelude.pm | 1 |
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; |