diff --git a/flight/template/View.php b/flight/template/View.php index 049c2ba..df10078 100644 --- a/flight/template/View.php +++ b/flight/template/View.php @@ -143,7 +143,7 @@ class View { * @return string Template file location */ public function getTemplate($file) { - return $this->path.'/'.((substr($file, -4) == '.php') ? $file : $file.'.php'); + return $this->path.'/'.basename($file, '.php').'.php'; } /**