$session->asset is not defined if we're running from a Content Handler or the like. make reporting it conditional so that we don't get error output from our error output.

This commit is contained in:
Scott Walters 2013-09-24 23:19:30 -05:00
parent fbb143116e
commit 690d87a668

View file

@ -689,7 +689,7 @@ sub process {
elsif ($self->state =~ /^clipboard/) {
my $i18n = WebGUI::International->new($session, 'Asset_Template');
$session->log->warn('process called on template in clipboard: '.$self->getId
.'. The template was called through this url: '.$session->asset->url);
.'. The template was called through this url: ' . $session->asset ? $session->asset->url : '(none)' );
return $session->isAdminOn ? $i18n->get('template in clipboard') : '';
}