diff --git a/lib/WebGUI/Asset/Template.pm b/lib/WebGUI/Asset/Template.pm index 0f44c7ef6..6dc3fb181 100644 --- a/lib/WebGUI/Asset/Template.pm +++ b/lib/WebGUI/Asset/Template.pm @@ -267,7 +267,8 @@ This method sets the tags from the head block parameter of the template into the sub prepare { my $self = shift; $self->{_prepared} = 1; - my @sent = @{$self->session->stow->get("templateHeadersSent")}; + my $templateHeadersSent = $self->session->stow->get("templateHeadersSent") || []; + my @sent = @{$templateHeadersSent}; unless (isIn($self->getId, @sent)) { # don't send head block if we've already sent it for this template if ($self->session->style->sent) { $self->session->output->print($self->get("headBlock"));