Trap exceptions when trying to get the featured wiki page.
This commit is contained in:
parent
996acb5ab5
commit
e43745cd86
1 changed files with 2 additions and 2 deletions
|
|
@ -839,8 +839,8 @@ sub view {
|
|||
|
||||
if( @$featuredIds ) {
|
||||
my $featuredId = $featuredIds->[ int( rand @$featuredIds ) - 1 ];
|
||||
my $featured = WebGUI::Asset->newById( $session, $featuredId );
|
||||
if ( $featured ) {
|
||||
my $featured = eval { WebGUI::Asset->newById( $session, $featuredId ) };
|
||||
if ( ! Exception::Class->caught() ) {
|
||||
$self->appendFeaturedPageVars( $var, $featured );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue