From: Guillermo Roditi Date: Tue, 2 Sep 2008 23:54:43 +0000 (+0000) Subject: only call ACCEPT_CONTEXT if we actually have a context X-Git-Tag: 5.8000_03~75 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=df543cc2e7a9697150669a51f2dd9292b0cba412 only call ACCEPT_CONTEXT if we actually have a context --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 8eb5838..b0d30d7 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -506,7 +506,7 @@ sub _comp_names { sub _filter_component { my ( $c, $comp, @args ) = @_; - if ( eval { $comp->can('ACCEPT_CONTEXT'); } ) { + if ( Scalar::Util::blessed($c) && eval { $comp->can('ACCEPT_CONTEXT'); } ) { return $comp->ACCEPT_CONTEXT( $c, @args ); }