Don't call ->debug if we don't have a context
Dagfinn Ilmari Mannsåker [Tue, 15 Jan 2013 20:36:45 +0000 (20:36 +0000)]
lib/Catalyst/View/TT.pm

index da9a3f0..712a7a7 100644 (file)
@@ -265,7 +265,7 @@ sub render {
             die $self->template->error if $self->{render_die};
             return $self->template->error;
         }
-        $c->log->debug('The Catalyst::View::TT render() method will start dying on error in a future release. Unless you are calling the render() method manually, you probably want the new behaviour, so set render_die => 1 in config for ' . blessed($self) . '. If you wish to continue to return the exception rather than throwing it, add render_die => 0 to your config.') if $c->debug;
+        $c->log->debug('The Catalyst::View::TT render() method will start dying on error in a future release. Unless you are calling the render() method manually, you probably want the new behaviour, so set render_die => 1 in config for ' . blessed($self) . '. If you wish to continue to return the exception rather than throwing it, add render_die => 0 to your config.') if $c && $c->debug;
         return $self->template->error;
     }
     return $output;