Skip to content

Commit

Permalink
Fixed bug where zoo would check nonexistant uid values.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon 'CowboyNeal' Pater committed Jul 15, 2003
1 parent d5c9f96 commit 32e7196
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/Zoo/templates/data;zoo;default
Expand Up @@ -114,7 +114,7 @@ __template__
Sorry, this is not an option.

[% CASE 'no_uid' %]
Sorry, you did not specify a user.
Sorry, you did not specify a valid user.

[% CASE 'over_socialized' %]
You are over the limit for the number of friends and foes you can have.
Expand Down
5 changes: 3 additions & 2 deletions plugins/Zoo/zoo.pl
Expand Up @@ -653,7 +653,9 @@ sub check {
my($zoo, $constants, $user, $form, $slashdb) = @_;

my $uid = $form->{uid} || "";
if (!$uid) {
my $nickname = $slashdb->getUser($uid, 'nickname');

if (!$uid || $nickname eq '') {
# See comment in plugins/Journal/journal.pl for its call of
# getSectionColors() as well.
Slash::Utility::Anchor::getSectionColors();
Expand All @@ -664,7 +666,6 @@ sub check {
return;
}

my $nickname = $slashdb->getUser($uid, 'nickname');
my $user_change = { };
if ($uid != $user->{uid} && !isAnon($uid) && !$user->{is_anon}) {
# Store the fact that this user last looked at that user.
Expand Down

0 comments on commit 32e7196

Please sign in to comment.