[Catalyst-commits] r9659 -
trunk/Catalyst-View-XSLT/lib/Catalyst/View
janus at dev.catalyst.perl.org
janus at dev.catalyst.perl.org
Mon Apr 6 08:07:40 GMT 2009
Author: janus
Date: 2009-04-06 09:07:40 +0100 (Mon, 06 Apr 2009)
New Revision: 9659
Modified:
trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT.pm
Log:
check for object references to prevent isa() on undefined values (RT#44783)
Modified: trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT.pm
===================================================================
--- trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT.pm 2009-04-04 05:01:28 UTC (rev 9658)
+++ trunk/Catalyst-View-XSLT/lib/Catalyst/View/XSLT.pm 2009-04-06 08:07:40 UTC (rev 9659)
@@ -225,7 +225,7 @@
my ( $self, $c, $template, $args ) = @_;
my $basePath;
- unless ( $template =~ m/\</ || $template->isa('GLOB') || -e $template ||
+ unless ( $template =~ m/\</ || (ref($template) && $template->isa('GLOB')) || -e $template ||
( ref($template) && !$template->isa('Path::Class::File') ) ) {
my $error;
@@ -256,7 +256,7 @@
# if xml is not string (therefore is a file (what about file descriptors ?!))
# and is not existsting in the file system
- unless ( $xml =~ m/\</ || $xml->isa('GLOB') || -e $xml ||
+ unless ( $xml =~ m/\</ || (ref($template) && $xml->isa('GLOB')) || -e $xml ||
( ref($xml) && !$xml->isa('Path::Class::File') ) ) {
my ($incPath, $error) = $self->_searchInIncPath($c, $xml);
More information about the Catalyst-commits
mailing list