]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/View/TT.pm
ajt updates, fixed AsForm to pass pod and podcoverage tests, also removed usless...
[maypole.git] / lib / Maypole / View / TT.pm
index 5778d8b734b22b0d78c940ef7007400f1fc85c89..c399a6f69b5ffb5afffc41608d62b6b765e5b0a7 100644 (file)
@@ -51,10 +51,15 @@ sub report_error {
     my $output;
     # Need to be very careful here.
     my $tt = Template->new;
+    unless (ref $r->{config}) {
+      warn "no config for this request\n";
+      $error .= '<br> There was a problem finding configuration for this request';
+      $r->{config} ||= {};
+    }
     if ($tt->process(\$error_template,
-        { err_type => $type, error => $error, 
-         config => { %{$r->{config}}},
-          request => $r, # We have that at least
+                    { err_type => $type, error => $error, 
+                      config => { (%{$r->{config}}) },
+                      request => $r, # We have that at least
         eval{$self->vars($r)} }, \$output )) {
         $r->{output} = $output;
         if ($tt->error) { $r->{output} = "<html><body>Even the error template