Skip to content
Browse files

Fixed factory method to create correct View_ class name when passing …

…in an argument containing '/' characters
  • Loading branch information...
1 parent b4bf291 commit 83bb721fc933dd2f2b8a1d10c4a33cc92190a229 @slacker slacker committed with May 28, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 classes/kohana/view.php
View
4 classes/kohana/view.php
@@ -47,8 +47,8 @@ public static function factory($file = NULL, array $data = NULL)
// Return a raw view object if no template is specified.
if ($file === FALSE)
return new View(FALSE, $data);
-
- $class = 'View_'.$file;
+
+ $class = 'View_'.strtr($file, '/', '_');
return new $class($file, $data);
}

0 comments on commit 83bb721

Please sign in to comment.
Something went wrong with that request. Please try again.