Skip to content

Commit

Permalink
Defensive check before trying to access empty string.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 26, 2016
1 parent a30ee07 commit 4709d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/View/View.php
Expand Up @@ -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] === ':') {
Expand Down

0 comments on commit 4709d06

Please sign in to comment.