Skip to content
Permalink
Browse files

Defensive check before trying to access empty string.

  • Loading branch information...
dereuromark committed Nov 26, 2016
1 parent a30ee07 commit 4709d06691196781256c5c33c96a3c7a3d04569e
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/View/View.php
@@ -1073,7 +1073,7 @@ protected function _getViewFileName($name = null)
list($plugin, $name) = $this->pluginSplit($name);
$name = str_replace('/', DIRECTORY_SEPARATOR, $name);
if (strpos($name, DIRECTORY_SEPARATOR) === false && $name[0] !== '.') {
if (strpos($name, DIRECTORY_SEPARATOR) === false && $name !== '' && $name[0] !== '.') {
$name = $templatePath . $subDir . $this->_inflectViewFileName($name);
} elseif (strpos($name, DIRECTORY_SEPARATOR) !== false) {
if ($name[0] === DIRECTORY_SEPARATOR || $name[1] === ':') {

0 comments on commit 4709d06

Please sign in to comment.
You can’t perform that action at this time.