check that userenv exists before checking its value

This commit is contained in:
kados 2006-12-07 15:31:59 +00:00
parent 24840b4278
commit 5d0e8b5e00
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ my ($template, $loggedinuser, $cookie)
});
my $val=count_items($record);
$template->param("candelete"=>1) if ($val==0||C4::Context->userenv->{flags} eq "1");
$template->param("candelete"=>1) if ($val==0||(C4::Context->userenv && C4::Context->userenv->{flags} eq "1"));
#Getting the list of all frameworks
my $queryfwk =$dbh->prepare("select frameworktext, frameworkcode from biblio_framework");