Skip to content

Commit

Permalink
Fixing issue with how the check is done for determining if templatePa…
Browse files Browse the repository at this point in the history
…th already terminates with subDir
  • Loading branch information
darensipes committed Jan 10, 2018
1 parent e3c3594 commit 4c3638f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/View/View.php
Expand Up @@ -1249,7 +1249,7 @@ protected function _getViewFileName($name = null)
if (strlen($this->subDir)) {
$subDir = $this->subDir . DIRECTORY_SEPARATOR;
// Check if templatePath already terminates with subDir
if (strrpos($templatePath, $subDir) == strlen($templatePath) - strlen($subDir)) {
if ($templatePath != $subDir && substr($templatePath, -(strlen($subDir))) == $subDir) {
$subDir = '';
}
}
Expand Down

0 comments on commit 4c3638f

Please sign in to comment.